claude-code-best 2.8.0 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/chunks/{AddWorkspaceDirectory-DRO4tbYd.js → AddWorkspaceDirectory-CNyPaerF.js} +1 -1
- package/dist/chunks/{App-DJyiiVKi.js → App-hiKxO6UA.js} +1 -1
- package/dist/chunks/{ApproveApiKey-DygOEAkM.js → ApproveApiKey-Cd43j9Wa.js} +1 -1
- package/dist/chunks/ApproveApiKey-DUoUTxFp.js +1 -0
- package/dist/chunks/{AssistantSessionChooser-C67mOxVi.js → AssistantSessionChooser-C8OxwSGM.js} +1 -1
- package/dist/chunks/{BackgroundTasksDialog-Bqk_Cn3j.js → BackgroundTasksDialog-VKhuyQLe.js} +2 -2
- package/dist/chunks/{BypassPermissionsModeDialog-C4z7RkFV.js → BypassPermissionsModeDialog-Ddjzluka.js} +1 -1
- package/dist/chunks/{ClaudeInChromeOnboarding-CyVFdjBe.js → ClaudeInChromeOnboarding-BhvrEJlm.js} +1 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-COO2W0ij.js +1 -0
- package/dist/chunks/{ClaudeMdExternalIncludesDialog-IpqqBuJs.js → ClaudeMdExternalIncludesDialog-DoNd72PS.js} +1 -1
- package/dist/chunks/ConsoleOAuthFlow-CPWq7O57.js +1 -0
- package/dist/chunks/{DesktopHandoff-CJpa8Xy-.js → DesktopHandoff-DVUOZjb0.js} +1 -1
- package/dist/chunks/{DevChannelsDialog-CfAuHVRL.js → DevChannelsDialog-DJbRHAIy.js} +1 -1
- package/dist/chunks/Dialog-91X6ZGg9.js +1 -0
- package/dist/chunks/{DiffDialog-CV3brWsG.js → DiffDialog-D0RK4t-9.js} +2 -2
- package/dist/chunks/{Doctor-D3GysagF.js → Doctor-0Nv3L1Oy.js} +1 -1
- package/dist/chunks/Doctor-Ba9zhV0V.js +1 -0
- package/dist/chunks/{ExitFlow-L2sh80sm.js → ExitFlow-BPbtGcEg.js} +1 -1
- package/dist/chunks/{Feedback-DfkBCvva.js → Feedback-BSagYjmf.js} +1 -1
- package/dist/chunks/{Grove-Bo74aZx-.js → Grove-BrP9JNpK.js} +1 -1
- package/dist/chunks/Grove-DyvIToPa.js +1 -0
- package/dist/chunks/{HybridTransport-BItIDJyC.js → HybridTransport-DLaxmXCR.js} +1 -1
- package/dist/chunks/{ITermBackend-3iS8Bvmo.js → ITermBackend-tXN55G2D.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-6lPGcuOX.js → InvalidConfigDialog-BzFQdfwu.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-D8DwHiys.js → InvalidSettingsDialog-KFg61s41.js} +1 -1
- package/dist/chunks/ListItem-DCQhApdJ.js +1 -0
- package/dist/chunks/{MCPConnectionManager-CsPizxTx.js → MCPConnectionManager-N-oJu3qn.js} +1 -1
- package/dist/chunks/{McpParsingWarnings-Cepe7RPZ.js → McpParsingWarnings-DsHSSgsx.js} +1 -1
- package/dist/chunks/{MessageSelector-BzUQUeDn.js → MessageSelector-D10JMnsc.js} +2 -2
- package/dist/chunks/Messages-CQdQJ2AA.js +11 -0
- package/dist/chunks/{Onboarding-BZUXID6q.js → Onboarding-DBJX6Cnf.js} +1 -1
- package/dist/chunks/{OverageCreditUpsell-Dhm7HBuD.js → OverageCreditUpsell-B4beCEX2.js} +1 -1
- package/dist/chunks/{PermissionDialog-BrRBxx5o.js → PermissionDialog-R-Vl4Tk-.js} +1 -1
- package/dist/chunks/{PluginSettings-BZ-PX9Tg.js → PluginSettings-BBrFCSpQ.js} +1 -1
- package/dist/chunks/{PressEnterToContinue-DtA_p3X6.js → PressEnterToContinue-BYdiZwYD.js} +1 -1
- package/dist/chunks/{PromptInputFooterSuggestions-Da8Fty6P.js → PromptInputFooterSuggestions-DAFZfAT0.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-Bz7EPzzq.js → PromptInputHelpMenu-Bjjr3tYl.js} +1 -1
- package/dist/chunks/{QueryEngine-CmJK27jU.js → QueryEngine-BSk8-8vB.js} +1 -1
- package/dist/chunks/{REPL-DxEJZpIp.js → REPL-CXcCBQuz.js} +13 -13
- package/dist/chunks/REPL-D-akKdFc.js +1 -0
- package/dist/chunks/{RemoteCallout-DONJj8l2.js → RemoteCallout-CuxqarhC.js} +1 -1
- package/dist/chunks/{RemoteSessionManager-BvvNspY8.js → RemoteSessionManager-BhPF41Wn.js} +1 -1
- package/dist/chunks/{ResumeConversation-EpjJdFHu.js → ResumeConversation-hmIOkZ2U.js} +1 -1
- package/dist/chunks/{SSETransport-D51Jfdaj.js → SSETransport-8yaTbdSK.js} +1 -1
- package/dist/chunks/SearchBox-Bu4gYF0J.js +1 -0
- package/dist/chunks/SearchExtraToolsTool-wDSdfnRo.js +1 -0
- package/dist/chunks/SentryErrorBoundary-Duyg6HeT.js +1 -0
- package/dist/chunks/{SentryErrorBoundary-nYTimi4l.js → SentryErrorBoundary-ydwbrVTx.js} +1 -1
- package/dist/chunks/{Settings-C2vEJjLx.js → Settings-BSbzT25q.js} +2 -2
- package/dist/chunks/{TeleportProgress--jgrqIfW.js → TeleportProgress-CNcl_DxR.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-BKDaFT_L.js → TeleportRepoMismatchDialog-DJc8_mjE.js} +1 -1
- package/dist/chunks/{TeleportResumeWrapper-CxlpiHIz.js → TeleportResumeWrapper-Cw438s-J.js} +1 -1
- package/dist/chunks/{ThemePicker-CYL4C-F-.js → ThemePicker-8X6yAwuQ.js} +1 -1
- package/dist/chunks/{TmuxBackend-C_N4ww8i.js → TmuxBackend-CqAnVFoI.js} +1 -1
- package/dist/chunks/{TrustDialog-CYdftZ1M.js → TrustDialog-Ch1FJzxi.js} +1 -1
- package/dist/chunks/{ValidationErrorsList-CaTwOP3f.js → ValidationErrorsList-sgfvJPWZ.js} +1 -1
- package/dist/chunks/{WelcomeV2-5rgKm4Mz.js → WelcomeV2-Bu8l3w90.js} +1 -1
- package/dist/chunks/{WindowsTerminalBackend-BzoSs0VA.js → WindowsTerminalBackend-Bvq7nHOp.js} +1 -1
- package/dist/chunks/{add-dir-RNzFR3XZ.js → add-dir-DqrRNnxe.js} +1 -1
- package/dist/chunks/{agentDisplay-DgeOQY1E.js → agentDisplay-DcxzWi1v.js} +1 -1
- package/dist/chunks/{agents-D7cgzb3f.js → agents-Do1ynqiW.js} +1 -1
- package/dist/chunks/{agents-iMtFurok.js → agents-QqLm1wcM.js} +1 -1
- package/dist/chunks/{ant-CF1iRpXD.js → ant-D5gD6O-r.js} +1 -1
- package/dist/chunks/api-VMfJpk1G.js +1 -0
- package/dist/chunks/{api-DMbWqJlK.js → api-hcsOinLV.js} +1 -1
- package/dist/chunks/{artifacts-D2kY_AMp.js → artifacts-DH8c2yG0.js} +1 -1
- package/dist/chunks/{assistant-JAqAZqaE.js → assistant-CemNvrYr.js} +1 -1
- package/dist/chunks/assistant-D7D1sqTB.js +1 -0
- package/dist/chunks/{assistant-CZ4VXgzH.js → assistant-DkECAILU.js} +1 -1
- package/dist/chunks/auth-CGdLe3rq.js +1 -0
- package/dist/chunks/{auth-BemPA3ot.js → auth-Dm8aWPRh.js} +1 -1
- package/dist/chunks/{autoMode-CGovMAzJ.js → autoMode-dygqoN_C.js} +1 -1
- package/dist/chunks/{autonomy-BVXyNEj0.js → autonomy-BdxnxJnk.js} +1 -1
- package/dist/chunks/{autonomy-BnAHLZWH.js → autonomy-DPeEmb00.js} +1 -1
- package/dist/chunks/{autonomyPanel-COMI2iR0.js → autonomyPanel-Bocl2taZ.js} +1 -1
- package/dist/chunks/backgroundHousekeeping-4H6yTjsj.js +1 -0
- package/dist/chunks/{backgroundHousekeeping-BRtG20l2.js → backgroundHousekeeping-zf-tDimg.js} +2 -2
- package/dist/chunks/{banner-D_rqe2XQ.js → banner-DUL-7A0b.js} +1 -1
- package/dist/chunks/{branch-BnKwIQtC.js → branch-DwdVgun5.js} +1 -1
- package/dist/chunks/{break-cache-CDzQDHwY.js → break-cache-DjCRzxDv.js} +1 -1
- package/dist/chunks/{bridge-ChVjEHVq.js → bridge-DkkMogD_.js} +2 -2
- package/dist/chunks/bridgeConfig-CTJBoASk.js +1 -0
- package/dist/chunks/{bridgeConfig-e0MGfed6.js → bridgeConfig-l6Ldi_hk.js} +1 -1
- package/dist/chunks/{bridgeEnabled-DR-v8AXw.js → bridgeEnabled-DYclTb9d.js} +1 -1
- package/dist/chunks/bridgeEnabled-SMuWz3Is.js +1 -0
- package/dist/chunks/{bridgeMain-OsR-_PRp.js → bridgeMain-Ct5oDosG.js} +11 -11
- package/dist/chunks/bridgeMain-UqwOi37W.js +1 -0
- package/dist/chunks/{bridgeMessaging-BvBnxgD4.js → bridgeMessaging-CYe1Cixl.js} +1 -1
- package/dist/chunks/{btw-_b16RGoh.js → btw-CyOlY5R-.js} +1 -1
- package/dist/chunks/{buddy-DJ3QSQyd.js → buddy-q-utA1_5.js} +1 -1
- package/dist/chunks/{bypassPermissionsKillswitch-OhGSWZrB.js → bypassPermissionsKillswitch-CTrRxzdz.js} +1 -1
- package/dist/chunks/{caches-Bp4F7tZ5.js → caches-Bz4yVQyE.js} +2 -2
- package/dist/chunks/caches-DKMoKTAZ.js +1 -0
- package/dist/chunks/{ccrClient-D7pEGzQa.js → ccrClient-DXiEw9xU.js} +1 -1
- package/dist/chunks/changeDetector--KPj2maX.js +1 -0
- package/dist/chunks/{channelNotification-BZFMAWln.js → channelNotification-CLPdvxGZ.js} +1 -1
- package/dist/chunks/channelNotification-fJgjqRMx.js +1 -0
- package/dist/chunks/{chrome-B5IxDA16.js → chrome-DxbhLWDW.js} +1 -1
- package/dist/chunks/clear-CYVCwiwu.js +1 -0
- package/dist/chunks/client-DvWRsIpi.js +1 -0
- package/dist/chunks/{color-BYVWpzI8.js → color-DiLtK8_L.js} +1 -1
- package/dist/chunks/commands-BT2_ICaW.js +1 -0
- package/dist/chunks/commitAttribution-Bpbro1a4.js +1 -0
- package/dist/chunks/{commitAttribution-ClSlXMPG.js → commitAttribution-CJXF8wMs.js} +1 -1
- package/dist/chunks/{compact-B9c12JXf.js → compact-C6xm1N5a.js} +1 -1
- package/dist/chunks/{companion-C8e7dVlu.js → companion-rXSt0nmz.js} +1 -1
- package/dist/chunks/completionCache-BQgiR45Q.js +1 -0
- package/dist/chunks/{completionCache-Br6OwASx.js → completionCache-C7hDqIDL.js} +1 -1
- package/dist/chunks/{config-C-yz-f4W.js → config-BE3jrcr-.js} +1 -1
- package/dist/chunks/{config-Bxgfx_nO.js → config-CzC08IjE.js} +1 -1
- package/dist/chunks/{context-Bf5t6C-a.js → context-BHE99SMA.js} +1 -1
- package/dist/chunks/context-noninteractive-BQDOgVUW.js +1 -0
- package/dist/chunks/{context-noninteractive-CJu7hZCM.js → context-noninteractive-BZQIUH_y.js} +13 -13
- package/dist/chunks/conversation-Bt6QdGd-.js +1 -0
- package/dist/chunks/{conversation-BYMS5Hqa.js → conversation-CBPRFDod.js} +1 -1
- package/dist/chunks/{copy-C0BZ7Gm0.js → copy-TgphIVzy.js} +1 -1
- package/dist/chunks/{createSSHSession-DNXCWneI.js → createSSHSession-CSKEZ4ic.js} +1 -1
- package/dist/chunks/createSession-BaHXBnfG.js +1 -0
- package/dist/chunks/{createSession-DjM6Ev45.js → createSession-Ce218tQj.js} +1 -1
- package/dist/chunks/{cronJitterConfig-CaFkPXKB.js → cronJitterConfig-CnKed5Gi.js} +1 -1
- package/dist/chunks/crossProjectResume-BFlsTYOq.js +40 -0
- package/dist/chunks/{datadog-ClZjR-jM.js → datadog-D5jSRybW.js} +1 -1
- package/dist/chunks/datadog-DgYqUGa-.js +1 -0
- package/dist/chunks/desktop-cjA0tGOa.js +1 -0
- package/dist/chunks/{diff-D9hjPq4W.js → diff-DMd61IjE.js} +1 -1
- package/dist/chunks/{doctor-4-im_J_h.js → doctor-ueUYyjyL.js} +1 -1
- package/dist/chunks/{effort-Bz-9GIpe.js → effort-B9IvAstG.js} +1 -1
- package/dist/chunks/entry-Bq_KRMWs.js +14 -0
- package/dist/chunks/{envLessBridgeConfig-DW4-nPbZ.js → envLessBridgeConfig-CpjlwmvF.js} +1 -1
- package/dist/chunks/envLessBridgeConfig-D_GCqhTu.js +1 -0
- package/dist/chunks/{exit-DBNDTR4b.js → exit-DtjFIrvJ.js} +1 -1
- package/dist/chunks/{export-CQHUM_Nv.js → export-CP638-TO.js} +1 -1
- package/dist/chunks/{exportRenderer-CuIDQBLH.js → exportRenderer-B5emJDvn.js} +1 -1
- package/dist/chunks/extra-usage-C4dUWLhg.js +1 -0
- package/dist/chunks/{extra-usage-DTr6gExD.js → extra-usage-DIm8nrKj.js} +1 -1
- package/dist/chunks/{extra-usage-core-D3CwYO_8.js → extra-usage-core-DERKSEe1.js} +1 -1
- package/dist/chunks/{extra-usage-noninteractive-d-QVg1D5.js → extra-usage-noninteractive-Dq5dog_-.js} +1 -1
- package/dist/chunks/{extraUsage-BNRQOkgU.js → extraUsage-BMvDY0Sk.js} +1 -1
- package/dist/chunks/extractMemories-DS7XXeEo.js +1 -0
- package/dist/chunks/{fast-bkGXbuHX.js → fast-BP2t1xDM.js} +1 -1
- package/dist/chunks/fast-D1xIHYaN.js +1 -0
- package/dist/chunks/{feedback-BvFgE_FF.js → feedback-C-mR6zJr.js} +1 -1
- package/dist/chunks/{firstPartyEventLogger-D-ifHvWu.js → firstPartyEventLogger-sMmHdYjg.js} +1 -1
- package/dist/chunks/{flushGate-BA24vFBg.js → flushGate-C18XwNsa.js} +1 -1
- package/dist/chunks/{fpsMetrics-CBFlAGTS.js → fpsMetrics-DH78PzGr.js} +1 -1
- package/dist/chunks/{gates-C66Nz9b2.js → gates-Be5r2kKS.js} +1 -1
- package/dist/chunks/gates-CUAwAhPL.js +1 -0
- package/dist/chunks/{gemini-DuQl4hTA.js → gemini-BberPcp1.js} +1 -1
- package/dist/chunks/{generateRecap-CwBU76xi.js → generateRecap-B76UcVUS.js} +1 -1
- package/dist/chunks/{generateSessionName-LnmjE9jh.js → generateSessionName-BwtXd8TC.js} +1 -1
- package/dist/chunks/{githubRepoPathMapping-DrreQj47.js → githubRepoPathMapping-5IlVgR2l.js} +1 -1
- package/dist/chunks/{goal-BIvjF6B7.js → goal-DQ0jNcLO.js} +1 -1
- package/dist/chunks/{grok-KNLYSRBQ.js → grok-Dh_thT2_.js} +1 -1
- package/dist/chunks/{growthbook-ksjGAskq.js → growthbook-4ADV3CAt.js} +1 -1
- package/dist/chunks/{heapdump-Cz8vkcOr.js → heapdump-Dwqmh4SX.js} +1 -1
- package/dist/chunks/{help-Cx9OordP.js → help-Bznaywoi.js} +1 -1
- package/dist/chunks/hooks-DynUngv2.js +1 -0
- package/dist/chunks/{hooks-BW-d9Bdu.js → hooks-F-82cg6M.js} +1 -1
- package/dist/chunks/{hostAdapter-DLmaB6eN.js → hostAdapter-DpfLr3hX.js} +1 -1
- package/dist/chunks/{ide-CECrIg1r.js → ide-BfAKWufQ.js} +1 -1
- package/dist/chunks/{inboundAttachments-B0sGIu79.js → inboundAttachments-CFV_eqMu.js} +1 -1
- package/dist/chunks/inboundAttachments-Cug-8Xdy.js +1 -0
- package/dist/chunks/{initReplBridge-BAEMZEcg.js → initReplBridge-DV9KhSic.js} +1 -1
- package/dist/chunks/{insights-DeWggLxC.js → insights-BNsCwNYa.js} +1 -1
- package/dist/chunks/{install-pxH_HR1p.js → install-Bszzs98N.js} +1 -1
- package/dist/chunks/{install-github-app-DqKEiHQ1.js → install-github-app-DVxGR2rp.js} +1 -1
- package/dist/chunks/{install-slack-app-P1L9x-YI.js → install-slack-app-CjlRL19o.js} +1 -1
- package/dist/chunks/{instrumentation-Dx0s2jzr.js → instrumentation-BOYPOtyu.js} +3 -3
- package/dist/chunks/{job-CbxxkPgE.js → job-BvD5_lGz.js} +1 -1
- package/dist/chunks/{keybindings-BBPC7FAc.js → keybindings-RPmPPGhp.js} +1 -1
- package/dist/chunks/{lang-CKp0Tn76.js → lang-9VNaOJMz.js} +1 -1
- package/dist/chunks/language-CjFs6_la.js +1 -0
- package/dist/chunks/{language-iERMuOEu.js → language-Ct5Nkqm6.js} +1 -1
- package/dist/chunks/{launchAgentsPlatform-DQvKVtl2.js → launchAgentsPlatform-CnoxFIXV.js} +1 -1
- package/dist/chunks/{launchAutofixPr-B7hu9C8h.js → launchAutofixPr-ChaDUtvx.js} +1 -1
- package/dist/chunks/{launchCommand-CJsikSlW.js → launchCommand-9eYsPG7W.js} +1 -1
- package/dist/chunks/{launchLocalMemory-Cpz7L5j5.js → launchLocalMemory-MwZfEJxz.js} +1 -1
- package/dist/chunks/{launchLocalVault-XLfOQtP7.js → launchLocalVault-B6Ib5WXx.js} +1 -1
- package/dist/chunks/{launchMemoryStores-Cz04PaDE.js → launchMemoryStores-D6xyGwQ1.js} +1 -1
- package/dist/chunks/{launchOnboarding-XPbUNdHS.js → launchOnboarding-BtdAOO3p.js} +1 -1
- package/dist/chunks/{launchSchedule-B1VEe3o-.js → launchSchedule-XVljzNKg.js} +1 -1
- package/dist/chunks/{launchSkillStore-Cy59z5xx.js → launchSkillStore-QT8Qcc5N.js} +1 -1
- package/dist/chunks/{launchTeleport-ZPM_DvzK.js → launchTeleport-DwxPesKQ.js} +1 -1
- package/dist/chunks/{launchVault-BhnTOZq8.js → launchVault-Dbti6pph.js} +1 -1
- package/dist/chunks/{loadAgentsDir-CQF8qhne.js → loadAgentsDir-BYWykYwn.js} +777 -777
- package/dist/chunks/loadAgentsDir-tPgCg0WD.js +1 -0
- package/dist/chunks/{loadPluginHooks-TyULD8KH.js → loadPluginHooks-2U3UO__Q.js} +1 -1
- package/dist/chunks/localSearch-CxwxzM8W.js +1 -0
- package/dist/chunks/{localSearch-BNYypHsK.js → localSearch-eWjZxMc8.js} +1 -1
- package/dist/chunks/login-CVVFklZw.js +1 -0
- package/dist/chunks/{login-CxbcJk9_.js → login-D1aQCqp0.js} +1 -1
- package/dist/chunks/{logoV2Utils-Br_w1z39.js → logoV2Utils-CPNvLtol.js} +1 -1
- package/dist/chunks/logout-BYsszpXx.js +1 -0
- package/dist/chunks/{magicDocs-DnxdS9yV.js → magicDocs-DAvjAbAJ.js} +1 -1
- package/dist/chunks/{main-FBmdv32j.js → main-BKlQiSuc.js} +31 -31
- package/dist/chunks/{mappers-BNI_df3v.js → mappers-BBkM1aA5.js} +1 -1
- package/dist/chunks/{mcp-esqdO_lV.js → mcp-C3jlClk0.js} +3 -3
- package/dist/chunks/{mcp-BhAGhDQE.js → mcp-Cmw8ecKk.js} +1 -1
- package/dist/chunks/{mcp-DbqUZ1Cf.js → mcp-ya96irNP.js} +1 -1
- package/dist/chunks/{mcpServer-DeL2ADSF.js → mcpServer-B1q9blAc.js} +1 -1
- package/dist/chunks/{mcpServer-Ct-GVL-y.js → mcpServer-BJB5g6j2.js} +1 -1
- package/dist/chunks/{memory-DwapBEsD.js → memory-CxiukAGg.js} +1 -1
- package/dist/chunks/{mobile-D7MSmMhc.js → mobile-DLGq6g08.js} +1 -1
- package/dist/chunks/{modalContext-DxfeT_3m.js → modalContext-CuTwi_eD.js} +1 -1
- package/dist/chunks/{mode-B5cmHCvz.js → mode-DqAJ2y6R.js} +1 -1
- package/dist/chunks/{model-BePO0VaC.js → model-C8TW-qjl.js} +1 -1
- package/dist/chunks/model-VB4ItNVB.js +1 -0
- package/dist/chunks/{onChangeAppState-B3d5iy6T.js → onChangeAppState-BG1pF7ht.js} +1 -1
- package/dist/chunks/{openai-fRhGOIQq.js → openai-CHoRhRtf.js} +1 -1
- package/dist/chunks/{overageCreditGrant-B6sx7IFi.js → overageCreditGrant-DYMg1lV4.js} +1 -1
- package/dist/chunks/{panel-CAVG5BOM.js → panel-BY6q16am.js} +1 -1
- package/dist/chunks/{panel-DU8y_jcf.js → panel-BdRBXAv3.js} +1 -1
- package/dist/chunks/panelCall-SYrmrKt9.js +1 -0
- package/dist/chunks/{passes-CWPPUigp.js → passes-CSV-SZJc.js} +1 -1
- package/dist/chunks/{paths-4ZWdjPP4.js → paths-BZjPDxMm.js} +3 -3
- package/dist/chunks/{permissions-DW8CRuJp.js → permissions-DBddT2NP.js} +1 -1
- package/dist/chunks/{pipeTransport-CUeYRWJn.js → pipeTransport-uK7GxbSG.js} +1 -1
- package/dist/chunks/{plan-Cf-tHvGq.js → plan-DEbo-Adi.js} +1 -1
- package/dist/chunks/plugin-Cops24hg.js +1 -0
- package/dist/chunks/{pluginAutoupdate-CdmKzIRf.js → pluginAutoupdate-Bg7JMOHN.js} +1 -1
- package/dist/chunks/{pluginBlocklist-C9XwbFSo.js → pluginBlocklist-DEM_RWc2.js} +1 -1
- package/dist/chunks/{pluginCliCommands-CmY_maYg.js → pluginCliCommands-DyYEg7Cv.js} +1 -1
- package/dist/chunks/{pluginFlagging-DyzxZolj.js → pluginFlagging-DwChUZMJ.js} +1 -1
- package/dist/chunks/{pluginOperations-mr4I7Jw9.js → pluginOperations-COyT4tHs.js} +1 -1
- package/dist/chunks/{pluginStartupCheck-B6OdK29Z.js → pluginStartupCheck-DCxJJkYs.js} +1 -1
- package/dist/chunks/pluginStartupCheck-DjfIaOch.js +1 -0
- package/dist/chunks/{plugins-rdPgpjF8.js → plugins-BanQjHmw.js} +1 -1
- package/dist/chunks/policyLimits-D-Y_soHx.js +1 -0
- package/dist/chunks/{pollConfig-DLbuHBse.js → pollConfig-DBNHhvHf.js} +1 -1
- package/dist/chunks/{poor-pmz2b7zu.js → poor-aPQce502.js} +1 -1
- package/dist/chunks/{poorMode-DD-q_w6Z.js → poorMode-CFRuV-nB.js} +1 -1
- package/dist/chunks/poorMode-DQagHYWe.js +1 -0
- package/dist/chunks/{print-luaON-Cg.js → print-Cf2tY__0.js} +4 -4
- package/dist/chunks/{privacy-settings-BpigC4oX.js → privacy-settings-CYkM3Aem.js} +1 -1
- package/dist/chunks/{processBashCommand-f_84bSlP.js → processBashCommand-BLSC8o8M.js} +1 -1
- package/dist/chunks/{processSlashCommand-BkBqV3Jd.js → processSlashCommand-Ch9B-6nh.js} +1 -1
- package/dist/chunks/projectContext-2CzYVggO.js +1 -0
- package/dist/chunks/projectContext-CVk2Ix1r.js +1 -0
- package/dist/chunks/{prompt-CogZQuTN.js → prompt-BGNhFY1n.js} +1 -1
- package/dist/chunks/prompt-CrNwH5kr.js +1 -0
- package/dist/chunks/prompt-dH0MMivt.js +1 -0
- package/dist/chunks/{promptEditor-C___2FFs.js → promptEditor-U03qQWbq.js} +1 -1
- package/dist/chunks/{protocolHandler-qwll5gSY.js → protocolHandler-3yBj9w5N.js} +1 -1
- package/dist/chunks/{rate-limit-options-nQcTipEp.js → rate-limit-options-D-xl_9PO.js} +1 -1
- package/dist/chunks/{rcDebugLog-DOXxIr8l.js → rcDebugLog-ClX1msJX.js} +1 -1
- package/dist/chunks/{referral-CMPZjf3I.js → referral-qe-yqXJE.js} +1 -1
- package/dist/chunks/{refresh-CP7Dnjp4.js → refresh-CO_P3WKA.js} +1 -1
- package/dist/chunks/{registerProtocol-DCNuqdCC.js → registerProtocol-CClQph00.js} +1 -1
- package/dist/chunks/{registry-DLqZJleQ.js → registry-C0zdU2Hb.js} +1 -1
- package/dist/chunks/{release-notes-BsDW6T9f.js → release-notes-CyZHxWTF.js} +1 -1
- package/dist/chunks/{releaseNotes-Tbd018Qz.js → releaseNotes-BtxL5R5Q.js} +2 -2
- package/dist/chunks/{reload-plugins-iG9ZE9wF.js → reload-plugins-B0eR8JHH.js} +1 -1
- package/dist/chunks/{remote-env-BFntnltf.js → remote-env-B_sIjY87.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-Dpko9c-J.js → remoteBridgeCore-C3WRaLpU.js} +1 -1
- package/dist/chunks/{remoteControlServer-D3P82kVF.js → remoteControlServer-BOj9qmgH.js} +1 -1
- package/dist/chunks/{rename-Codm2nfB.js → rename-BFAC3WLD.js} +1 -1
- package/dist/chunks/{resume-BB1ceL_x.js → resume-CpivBr9S.js} +1 -1
- package/dist/chunks/{runtimeObserver-BpRn0RiL.js → runtimeObserver-C2_7Vsnd.js} +1 -1
- package/dist/chunks/{runtimeObserver-D6aF77Dq.js → runtimeObserver-sOnfVR7t.js} +2 -2
- package/dist/chunks/sandbox-adapter-jX_WzvnK.js +1 -0
- package/dist/chunks/{sandbox-toggle-DZ-8qXDS.js → sandbox-toggle-Bv68-Ca7.js} +1 -1
- package/dist/chunks/searchExtraTools-xPuOKDpi.js +1 -0
- package/dist/chunks/{sentry-CVdHlmNQ.js → sentry-BBCn6RGP.js} +1 -1
- package/dist/chunks/{session-B4j1ViVc.js → session-DfvxYP8o.js} +1 -1
- package/dist/chunks/{sessionDiscovery-DkIIFsWX.js → sessionDiscovery-CyuRBTAm.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-DiKsr7H7.js +1 -0
- package/dist/chunks/sessionMemory-C34-eFnJ.js +1 -0
- package/dist/chunks/{sessionMemory-CnT3-Mj7.js → sessionMemory-kYQnpcyG.js} +1 -1
- package/dist/chunks/sessionMemoryUtils-CcJcgftx.js +1 -0
- package/dist/chunks/sessionObserver-B73s6yu8.js +1 -0
- package/dist/chunks/{sessionObserver-gjdJ91cv.js → sessionObserver-CTkIYplM.js} +1 -1
- package/dist/chunks/sessionStorage-BHi7PKs-.js +1 -0
- package/dist/chunks/{sessionTitle-CSU5-VK9.js → sessionTitle-ePQRpeV2.js} +1 -1
- package/dist/chunks/{sessionTracing-BDN64fWh.js → sessionTracing-81-RIJBo.js} +1 -1
- package/dist/chunks/{settingsSync-Nixbcaox.js → settingsSync-DEFWnE1o.js} +1 -1
- package/dist/chunks/{setup-CZxLEcQh.js → setup-2611vmGJ.js} +1 -1
- package/dist/chunks/{setup-n3Ixr_gs.js → setup-BJSk1czd.js} +2 -2
- package/dist/chunks/{setup-9nXlu56r.js → setup-CTfYsKsz.js} +1 -1
- package/dist/chunks/{shadowedRuleDetection-CCS7R7F1.js → shadowedRuleDetection-CGD7Nx03.js} +1 -1
- package/dist/chunks/{sideQuestion-MzExGTvn.js → sideQuestion-BcP9Mm-5.js} +1 -1
- package/dist/chunks/{sink-BL75jACh.js → sink-D_t1TIt9.js} +1 -1
- package/dist/chunks/sink-i8NmYch9.js +1 -0
- package/dist/chunks/sinks-3w0mLszx.js +1 -0
- package/dist/chunks/{sinks-C-gxj_Eu.js → sinks-DXsozhmS.js} +2 -2
- package/dist/chunks/{skill-learning-B9Msm4jG.js → skill-learning-CZm2iMik.js} +2 -2
- package/dist/chunks/{skillChangeDetector-DlWPJTny.js → skillChangeDetector-1aFn40GC.js} +1 -1
- package/dist/chunks/{skillGapStore-Cpmbwyo3.js → skillGapStore-DzHv8v-D.js} +1 -1
- package/dist/chunks/{skillGapStore-CsADiV5a.js → skillGapStore-cWo6Ra90.js} +2 -2
- package/dist/chunks/{skillGenerator-_khb-Gmc.js → skillGenerator-D_W1IeP3.js} +2 -2
- package/dist/chunks/skillLearning-Bddmbx8E.js +1 -0
- package/dist/chunks/skillLearning-C-uI_jZB.js +1 -0
- package/dist/chunks/{skillPanel-DQmj3Yh1.js → skillPanel-ChmOZu4F.js} +3 -3
- package/dist/chunks/{skillSearchPanel-6w_zzoI3.js → skillSearchPanel-CVx2b4Pr.js} +2 -2
- package/dist/chunks/{skills-B3LN9tp9.js → skills-CWX1SydA.js} +1 -1
- package/dist/chunks/{sprites-8JVWnXzp.js → sprites-BuvEFwW6.js} +1 -1
- package/dist/chunks/{src-KjMLauwe.js → src-Di342QoJ.js} +1 -1
- package/dist/chunks/{src-BJM0zMNO.js → src-poaoYkuc.js} +1 -1
- package/dist/chunks/startupProfiler-CBcN1Chw.js +3 -0
- package/dist/chunks/startupProfiler-DtTgsdnI.js +1 -0
- package/dist/chunks/{staticRender-DboURbK0.js → staticRender-DKFIRhkH.js} +1 -1
- package/dist/chunks/{stats-BDlygx5X.js → stats-wjMQA-CA.js} +1 -1
- package/dist/chunks/status-CyU7IQhO.js +1 -0
- package/dist/chunks/{statusNoticeHelpers-Cd_LDPvn.js → statusNoticeHelpers-JNibsI_v.js} +1 -1
- package/dist/chunks/{tag-BLPgXlQZ.js → tag-opEEZI5B.js} +1 -1
- package/dist/chunks/tasks-CCtnU5u1.js +1 -0
- package/dist/chunks/{teamHelpers-B-poMJeE.js → teamHelpers-BJJs8taN.js} +1 -1
- package/dist/chunks/teamHelpers-D41zdxpl.js +1 -0
- package/dist/chunks/{teammateModeSnapshot-B1_3D1CQ.js → teammateModeSnapshot-CLiiOCkO.js} +1 -1
- package/dist/chunks/teammateModeSnapshot-q-bARbLL.js +1 -0
- package/dist/chunks/{teleport-CSo3PT05.js → teleport-ClxQigSQ.js} +1 -1
- package/dist/chunks/{templateJobs-BVebX2BK.js → templateJobs-C6D7GC-Q.js} +1 -1
- package/dist/chunks/{terminalSetup-DHWL0gnz.js → terminalSetup-2ioFcRAA.js} +1 -1
- package/dist/chunks/{terminalSetup-DZTEKKne.js → terminalSetup-B3bN4Cj8.js} +1 -1
- package/dist/chunks/{theme-BHQSNwSe.js → theme-Dgq_Og2P.js} +1 -1
- package/dist/chunks/thinkback-BE8NNmAo.js +1 -0
- package/dist/chunks/{thinkback-DOzxcgMy.js → thinkback-C43WBHis.js} +1 -1
- package/dist/chunks/{thinkback-play-CK1C_F7G.js → thinkback-play-D2_n_aoQ.js} +1 -1
- package/dist/chunks/{toolEventObserver-BIjUIh4k.js → toolEventObserver-B7EA-nNa.js} +1 -1
- package/dist/chunks/{toolEventObserver-XPorjjtG.js → toolEventObserver-BG_3sGCL.js} +1 -1
- package/dist/chunks/toolPool-BLshLuvo.js +1 -0
- package/dist/chunks/{toolPool-hQlvQn-j.js → toolPool-HYKCHxDA.js} +1 -1
- package/dist/chunks/{trustedDevice-D-L5uAor.js → trustedDevice-DeNxe6bl.js} +1 -1
- package/dist/chunks/{trustedDevice-CyfQd_GU.js → trustedDevice-S34i6Jc9.js} +1 -1
- package/dist/chunks/{tui-C7aBeORE.js → tui-DcXIK0fP.js} +1 -1
- package/dist/chunks/{ultrareviewCommand-rnMsUWTn.js → ultrareviewCommand-C45bmZqN.js} +1 -1
- package/dist/chunks/undercover-B4sdXe12.js +1 -0
- package/dist/chunks/{undercover-ClLYK52H.js → undercover-DoUSM8d6.js} +1 -1
- package/dist/chunks/{updateCCB-pqkACWbs.js → updateCCB-BuAm25MX.js} +1 -1
- package/dist/chunks/{upgrade-DpfZlPyC.js → upgrade-BDKg286g.js} +1 -1
- package/dist/chunks/upgrade-BiWGhm2d.js +1 -0
- package/dist/chunks/{upload-D98tqZnO.js → upload-CMptZXZs.js} +1 -1
- package/dist/chunks/{usage-CRquq5_O.js → usage-Bw_LK9YI.js} +1 -1
- package/dist/chunks/{usage-BWd5R6DU.js → usage-DEWsKPXj.js} +1 -1
- package/dist/chunks/{useExitOnCtrlCDWithKeybindings-Dkcp6EkA.js → useExitOnCtrlCDWithKeybindings-BHi41Ku_.js} +1 -1
- package/dist/chunks/useKeybinding-DPOUuymz.js +1 -0
- package/dist/chunks/useMainLoopModel-D0PmGDuy.js +1 -0
- package/dist/chunks/{useManagePlugins-DMY74XAk.js → useManagePlugins-B-ejJsXy.js} +1 -1
- package/dist/chunks/{useMergedTools-NN58Kguw.js → useMergedTools-B6x9qtfj.js} +1 -1
- package/dist/chunks/{useSearchInput-CodP_5SB.js → useSearchInput-BpMLsxaS.js} +1 -1
- package/dist/chunks/{useSettingsErrors-BRxaYl6B.js → useSettingsErrors-DUe4k_RK.js} +1 -1
- package/dist/chunks/useTerminalSize-Du-EamDN.js +1 -0
- package/dist/chunks/{useVoice-ByU-q_w4.js → useVoice-C3ryR2HE.js} +1 -1
- package/dist/chunks/{util-SpgBY5_I.js → util-DWl5gjmI.js} +1 -1
- package/dist/chunks/utils-DP3EtI6F.js +1 -0
- package/dist/chunks/{validatePlugin-CxCXNV8o.js → validatePlugin-8EMSASvV.js} +1 -1
- package/dist/chunks/{vim-ByXlYzf9.js → vim-CaZ20SrQ.js} +1 -1
- package/dist/chunks/{voice-BnLS_SdQ.js → voice-BrnKguEV.js} +1 -1
- package/dist/chunks/{voiceModeEnabled-D070o6QK.js → voiceModeEnabled-3eg8vSqy.js} +1 -1
- package/dist/chunks/voiceModeEnabled-B1ARFTcz.js +1 -0
- package/dist/chunks/voiceStreamSTT-CONK4g-B.js +1 -0
- package/dist/chunks/{voiceStreamSTT-vkQ-Aop7.js → voiceStreamSTT-D7jWIYwz.js} +1 -1
- package/dist/chunks/{web-tools-1yM0ZBfA.js → web-tools-BT3TbzG5.js} +1 -1
- package/dist/chunks/{workerRegistry-7xGv_sNB.js → workerRegistry-C_i5wwjL.js} +1 -1
- package/dist/chunks/worktree-CFNQKVGn.js +1 -0
- package/dist/chunks/{xml-BUaEXGXx.js → xml-DOXio8vw.js} +1 -1
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/ApproveApiKey-oTZKoMvB.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-5FCT81WS.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-BmGziW64.js +0 -1
- package/dist/chunks/Dialog-C8eGKH-e.js +0 -1
- package/dist/chunks/Doctor-DohPtIKu.js +0 -1
- package/dist/chunks/Grove-C_ocvHd3.js +0 -1
- package/dist/chunks/ListItem-DDMe4CJ3.js +0 -1
- package/dist/chunks/Messages-KmeXIJqL.js +0 -11
- package/dist/chunks/REPL-BBmn_itf.js +0 -1
- package/dist/chunks/SearchBox-CciJ8giD.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-kjVFsFkT.js +0 -1
- package/dist/chunks/SentryErrorBoundary-DsrmgmKF.js +0 -1
- package/dist/chunks/api-DkgaFAzq.js +0 -1
- package/dist/chunks/assistant-CiNV3Q0f.js +0 -1
- package/dist/chunks/auth-CbQCc9vz.js +0 -1
- package/dist/chunks/backgroundHousekeeping-LYpOamcN.js +0 -1
- package/dist/chunks/bridgeConfig-Budgp2Go.js +0 -1
- package/dist/chunks/bridgeEnabled-DmvmwuUY.js +0 -1
- package/dist/chunks/bridgeMain-KYR5iq6H.js +0 -1
- package/dist/chunks/caches-CkH9F-Fd.js +0 -1
- package/dist/chunks/ccshareResume-DPP1blaU.js +0 -1
- package/dist/chunks/changeDetector-IFbty4jj.js +0 -1
- package/dist/chunks/channelNotification-CIyWY0hs.js +0 -1
- package/dist/chunks/clear-BVjSQsUL.js +0 -1
- package/dist/chunks/client-BUUsZdSe.js +0 -1
- package/dist/chunks/commands-pTQdOvN6.js +0 -1
- package/dist/chunks/commitAttribution-QPrKt_BF.js +0 -1
- package/dist/chunks/completionCache-BB7-y2BX.js +0 -1
- package/dist/chunks/context-noninteractive-OUTZ6BKj.js +0 -1
- package/dist/chunks/conversation-Bs8l0KNl.js +0 -1
- package/dist/chunks/createSession-DpqtD4ML.js +0 -1
- package/dist/chunks/crossProjectResume-BCr6jfGz.js +0 -40
- package/dist/chunks/datadog-DlzPb5oG.js +0 -1
- package/dist/chunks/desktop-WH8s-9-6.js +0 -1
- package/dist/chunks/entry-CEBaLwEG.js +0 -14
- package/dist/chunks/envLessBridgeConfig-izoVnE8s.js +0 -1
- package/dist/chunks/extra-usage-VSASGlte.js +0 -1
- package/dist/chunks/extractMemories-hQlhiVOD.js +0 -1
- package/dist/chunks/fast-2gWrhEFZ.js +0 -1
- package/dist/chunks/gates-dO6m4Hdp.js +0 -1
- package/dist/chunks/hooks-BWoN0nQP.js +0 -1
- package/dist/chunks/inboundAttachments-D8vq1NQO.js +0 -1
- package/dist/chunks/language-CSDpzbTz.js +0 -1
- package/dist/chunks/loadAgentsDir-B-4D2dVE.js +0 -1
- package/dist/chunks/localSearch-DsFH9yls.js +0 -1
- package/dist/chunks/login-CEJEl2mW.js +0 -1
- package/dist/chunks/logout-BXr4jzNY.js +0 -1
- package/dist/chunks/model-CgH43-hO.js +0 -1
- package/dist/chunks/panelCall-DUQdjDee.js +0 -1
- package/dist/chunks/plugin-DXhCgoNC.js +0 -1
- package/dist/chunks/pluginStartupCheck-BFuZqpnX.js +0 -1
- package/dist/chunks/policyLimits-B3dtp_Fe.js +0 -1
- package/dist/chunks/poorMode-BPIUnFFi.js +0 -1
- package/dist/chunks/projectContext-2Z2w8AI8.js +0 -1
- package/dist/chunks/projectContext-fS1t-xRh.js +0 -1
- package/dist/chunks/prompt-CriAIdkT.js +0 -1
- package/dist/chunks/prompt-TGc_H1cL.js +0 -1
- package/dist/chunks/sandbox-adapter-DrHD1mch.js +0 -1
- package/dist/chunks/searchExtraTools-Dwg6ZafS.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-n7HcOfZ7.js +0 -1
- package/dist/chunks/sessionMemory-DVq43VXP.js +0 -1
- package/dist/chunks/sessionMemoryUtils-BjkdLRvh.js +0 -1
- package/dist/chunks/sessionObserver-CrfmnMzL.js +0 -1
- package/dist/chunks/sessionStorage-BTbr9wkZ.js +0 -1
- package/dist/chunks/sink-CoUVbLFs.js +0 -1
- package/dist/chunks/sinks-wuo1yQ_m.js +0 -1
- package/dist/chunks/skillLearning-CFnZiM5J.js +0 -1
- package/dist/chunks/skillLearning-D6mvGN90.js +0 -1
- package/dist/chunks/startupProfiler-BmnoJtfF.js +0 -1
- package/dist/chunks/startupProfiler-rCtNuhXz.js +0 -3
- package/dist/chunks/status-DlT1tUmc.js +0 -1
- package/dist/chunks/tasks-Bf1Nf3WX.js +0 -1
- package/dist/chunks/teamHelpers-DeQCfdgu.js +0 -1
- package/dist/chunks/teammateModeSnapshot-BRuKcJNr.js +0 -1
- package/dist/chunks/thinkback-CVYpxAyO.js +0 -1
- package/dist/chunks/toolPool-CDEeuQd2.js +0 -1
- package/dist/chunks/undercover-BviGW-bQ.js +0 -1
- package/dist/chunks/upgrade-DAuhXFVI.js +0 -1
- package/dist/chunks/useKeybinding-DOjEx42R.js +0 -1
- package/dist/chunks/useMainLoopModel-BZoZdEdj.js +0 -1
- package/dist/chunks/useTerminalSize-mqo2Swmk.js +0 -1
- package/dist/chunks/utils-CM5oEyAY.js +0 -1
- package/dist/chunks/voiceModeEnabled-B3njLfhA.js +0 -1
- package/dist/chunks/voiceStreamSTT-BkeyhhFJ.js +0 -1
- package/dist/chunks/worktree-UA9gKCwL.js +0 -1
- /package/dist/chunks/{chromeNativeHost-DfYuJafI.js → chromeNativeHost-BldB1Zzi.js} +0 -0
- /package/dist/chunks/{claudeDesktop-CEQCLZmG.js → claudeDesktop-BqTW_pbB.js} +0 -0
- /package/dist/chunks/{cleanup-DUVwlFl7.js → cleanup-rCLlo4w8.js} +0 -0
- /package/dist/chunks/{eventLoopStallDetector-MNrFR4OH.js → eventLoopStallDetector-bYy0fesH.js} +0 -0
- /package/dist/chunks/{postCommitAttribution-Br4g4R6h.js → postCommitAttribution-D8MoHFoz.js} +0 -0
- /package/dist/chunks/{sdkHeapDumpMonitor-DTHI5WbD.js → sdkHeapDumpMonitor-DLMMNeqo.js} +0 -0
- /package/dist/chunks/{sessionDataUploader-BgmJTXQr.js → sessionDataUploader-CsNePsOb.js} +0 -0
- /package/dist/chunks/{udsClient-B85rNglp.js → udsClient-CBF_cZFW.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./REPL-CXcCBQuz.js";export{e as REPL};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,t as i,x as a}from"./src-
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,t as i,x as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{Cc as s,Jt as c,dc as l,on as u,yc as d}from"./paths-BZjPDxMm.js";import{aS as f,oS as p}from"./loadAgentsDir-BYWykYwn.js";import{i as m,r as h}from"./bridgeEnabled-DYclTb9d.js";import{n as g,t as _}from"./PermissionDialog-R-Vl4Tk-.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)(()=>{s(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()||!c()?.accessToken)}var b,x,S=e((()=>{b=t(n(),1),h(),i(),u(),d(),p(),g(),x=o()}));export{S as n,y as r,v as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{n as r,t as i}from"./defineProperty-80gRi2ZW.js";import{In as a,Ln as o,Rn as s,b as c,t as l,v as u,x as d}from"./src-
|
|
1
|
+
import{o as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{n as r,t as i}from"./defineProperty-80gRi2ZW.js";import{In as a,Ln as o,Rn as s,b as c,t as l,v as u,x as d}from"./src-Di342QoJ.js";import{t as ee}from"./jsx-runtime-D-D469L8.js";import{Cc as f,Dr as te,Fa as p,Ka as m,Na as ne,Nr as h,Pr as re,Qa as ie,S as g,Sc as ae,_,dc as v,fl as oe,g as se,gt as ce,lc as y,no as b,on as le,oo as ue,pl as x,sn as S,vt as C,yc as w}from"./paths-BZjPDxMm.js";import{D as de,E as fe,O as T,U as pe,l as E,p as D,z as me}from"./debug-otxXY3j-.js";import{n as he,r as ge}from"./analytics-DqMQntaB.js";import{n as _e,t as O}from"./cwd--iizewsn.js";import{_ as ve,f as ye,g as be,v as k}from"./git-C0IuvuIy.js";import{l as A,u as j}from"./oauth-CdZEzMww.js";import{a as M,n as N}from"./env-C2A9gV_G.js";import{o as P,s as F}from"./log-DSV4Ht5l.js";import{i as I,o as xe}from"./platform-mh9ypxS8.js";import{n as L,r as Se}from"./execFileNoThrow-azCkYhmF.js";import{l as Ce,r as we}from"./teammate-CbskW5G9.js";import{c as Te,g as Ee,h as R,l as De,u as Oe}from"./proxy-CF7ZDxaW.js";import{$A as z,AT as B,Ax as ke,Dj as Ae,Dx as je,Fr as Me,Fx as Ne,Is as Pe,Ix as Fe,Lr as Ie,Lx as Le,Ms as Re,Mx as ze,Rx as Be,Tj as Ve,Ty as V,Ys as He,aS as Ue,bj as We,jT as Ge,jy as Ke,oS as qe,qs as Je,tj as Ye,vd as Xe,vr as Ze,wx as Qe,yd as $e}from"./loadAgentsDir-BYWykYwn.js";import{M as et,P as tt}from"./prompt-BGNhFY1n.js";import{n as nt,o as rt}from"./fileStateCache-BhVfo23e.js";import{a as H,i as U,o as W}from"./teamHelpers-BJJs8taN.js";import{d as it,o as at}from"./api-hcsOinLV.js";import{c as ot,i as st}from"./terminalSetup-2ioFcRAA.js";import{a as ct,r as lt,s as ut,t as dt}from"./referral-qe-yqXJE.js";import{n as ft,t as pt}from"./PermissionDialog-R-Vl4Tk-.js";import{n as mt,r as ht,t as gt}from"./overageCreditGrant-DYMg1lV4.js";import{i as _t,o as vt}from"./OverageCreditUpsell-B4beCEX2.js";import{n as yt,t as bt}from"./DesktopHandoff-DVUOZjb0.js";import{randomUUID as xt}from"crypto";E(),P(),Ce(),H();function St(){let e=we();if(!e?.teamName||!e?.agentName){D(`[Reconnection] computeInitialTeamContext: No teammate context set (not a teammate)`);return}let{teamName:t,agentId:n,agentName:r}=e,i=W(t);if(!i){F(Error(`[computeInitialTeamContext] Could not read team file for ${t}`));return}let a=U(t),o=!n;return D(`[Reconnection] Computed initial team context for ${o?`leader`:`teammate ${r}`} in team ${t}`),{teamName:t,teamFilePath:a,leadAgentId:i.leadAgentId,selfAgentId:n,selfAgentName:r,isLeader:o,teammates:{}}}function Ct(e,t,n){let r=W(t);if(!r){F(Error(`[initializeTeammateContextFromSession] Could not read team file for ${t} (agent: ${n})`));return}let i=r.members.find(e=>e.name===n);i||D(`[Reconnection] Member ${n} not found in team ${t} - may have been removed`);let a=i?.agentId,o=U(t);e(e=>({...e,teamContext:{teamName:t,teamFilePath:o,leadAgentId:r.leadAgentId,selfAgentId:a,selfAgentName:n,isLeader:!1,teammates:{}}})),D(`[Reconnection] Initialized agent context from session for ${n} in team ${t}`)}n(),oe(),_e(),w(),M(),Se(),k(),P(),C();var wt=[/(?:^|\/)(?:package-lock\.json|yarn\.lock|bun\.lock|bun\.lockb|pnpm-lock\.yaml|Pipfile\.lock|poetry\.lock|Cargo\.lock|Gemfile\.lock|go\.sum|composer\.lock|uv\.lock)$/,/\.generated\./,/(?:^|\/)(?:dist|build|out|target|node_modules|\.next|__pycache__)\//,/\.(?:min\.js|min\.css|map|pyc|pyo)$/,/\.(?:json|ya?ml|toml|xml|ini|cfg|conf|env|lock|txt|md|mdx|rst|csv|log|svg)$/i,/(?:^|\/)\.?(?:eslintrc|prettierrc|babelrc|editorconfig|gitignore|gitattributes|dockerignore|npmrc)/,/(?:^|\/)(?:tsconfig|jsconfig|biome|vitest\.config|jest\.config|webpack\.config|vite\.config|rollup\.config)\.[a-z]+$/,/(?:^|\/)\.(?:github|vscode|idea|claude)\//,/(?:^|\/)(?:CHANGELOG|LICENSE|CONTRIBUTING|CODEOWNERS|README)(?:\.[a-z]+)?$/i];function Tt(e){return!wt.some(t=>t.test(e))}function Et(e,t){let n=[],r=new Set,i=new Map;for(let a=1;n.length<t&&a<=t;a++)for(let o of e){if(n.length>=t)break;if(!Tt(o))continue;let e=Math.max(o.lastIndexOf(`/`),o.lastIndexOf(`\\`)),s=e>=0?o.slice(e+1):o;if(!s||r.has(s))continue;let c=e>=0?o.slice(0,e):`.`;(i.get(c)??0)>=a||(n.push(s),r.add(s),i.set(c,(i.get(c)??0)+1))}return n.length>=t?n:[]}async function Dt(){if(N.platform===`win32`||!await ye())return[];try{let e=await ce(),t=[`log`,`-n`,`1000`,`--pretty=format:`,`--name-only`,`--diff-filter=M`],n=new Map,r=e=>{for(let t of e.split(`
|
|
2
2
|
`)){let e=t.trim();e&&n.set(e,(n.get(e)??0)+1)}};if(e){let{stdout:n}=await L(`git`,[...t,`--author=${e}`],{cwd:O()});r(n)}if(n.size<10){let{stdout:e}=await L(ve(),t,{cwd:O()});r(e)}return Et(Array.from(n.entries()).sort((e,t)=>t[1]-e[1]).map(([e])=>e),5)}catch(e){return F(e),[]}}var Ot=10080*60*1e3,kt=t(()=>{let e=y(),t=e.exampleFiles?.length?x(e.exampleFiles):`<filepath>`;return`Try "${x([`fix lint errors`,`fix typecheck errors`,`how does ${t} work?`,`refactor ${t}`,`how do I log an error?`,`edit ${t} to...`,`write a test for ${t}`,`create a util logging.py that...`])}"`}),At=t(async()=>{let e=y();Date.now()-(e.exampleFilesGeneratedAt??0)>Ot&&(e.exampleFiles=[]),e.exampleFiles?.length||Dt().then(e=>{e.length&&ae(t=>({...t,exampleFiles:e,exampleFilesGeneratedAt:Date.now()}))})});p();var jt={"claude-3-opus":{modelName:`Claude 3 Opus`,retirementDates:{firstParty:`January 5, 2026`,bedrock:`January 15, 2026`,vertex:`January 5, 2026`,foundry:`January 5, 2026`}},"claude-3-7-sonnet":{modelName:`Claude 3.7 Sonnet`,retirementDates:{firstParty:`February 19, 2026`,bedrock:`April 28, 2026`,vertex:`May 11, 2026`,foundry:`February 19, 2026`}},"claude-3-5-haiku":{modelName:`Claude 3.5 Haiku`,retirementDates:{firstParty:`February 19, 2026`,bedrock:null,vertex:null,foundry:null}}};function Mt(e){let t=e.toLowerCase(),n=ne();for(let[e,r]of Object.entries(jt)){let i=r.retirementDates[n];if(!(!t.includes(e)||!i))return{isDeprecated:!0,modelName:r.modelName,retirementDate:i}}return{isDeprecated:!1}}function Nt(e){if(!e)return null;let t=Mt(e);return t.isDeprecated?`⚠ ${t.modelName} will be retired on ${t.retirementDate}. Consider switching to a newer model.`:null}r(),o(),pe(),fe(),j(),xe(),ue(),le(),st(),Ke(),$e(),Me();var G=e(s(),1);l(),g(),he(),w(),qe(),yt(),ft();var K=ee(),Pt={enable_shortcut_tip:!1,enable_startup_dialog:!1};function q(){return se(`tengu_desktop_upsell`,Pt)}function Ft(){return process.platform===`darwin`||process.platform===`win32`&&process.arch===`x64`}function It(){if(!Ft()||!q().enable_startup_dialog)return!1;let e=v();return!(e.desktopUpsellDismissed||(e.desktopUpsellSeenCount??0)>=3)}function Lt({onDone:e}){let[t,n]=(0,G.useState)(!1);if((0,G.useEffect)(()=>{let e=(v().desktopUpsellSeenCount??0)+1;f(t=>(t.desktopUpsellSeenCount??0)>=e?t:{...t,desktopUpsellSeenCount:e}),ge(`tengu_desktop_upsell_shown`,{seen_count:e})},[]),t)return(0,K.jsx)(bt,{onDone:()=>e()});function r(t){switch(t){case`try`:n(!0);return;case`never`:f(e=>e.desktopUpsellDismissed?e:{...e,desktopUpsellDismissed:!0}),e();return;case`not-now`:e();return}}return(0,K.jsx)(pt,{title:`Try Claude Code Desktop`,children:(0,K.jsxs)(d,{flexDirection:`column`,paddingX:2,paddingY:1,children:[(0,K.jsx)(d,{marginBottom:1,children:(0,K.jsx)(c,{children:`Same Claude Code with visual diffs, live app preview, parallel sessions, and more.`})}),(0,K.jsx)(Ue,{options:[{label:`Open in Claude Code Desktop`,value:`try`},{label:`Not now`,value:`not-now`},{label:`Don't ask again`,value:`never`}],onChange:r,onCancel:()=>r(`not-now`)})]})})}re(),Ve(),Ye(),et(),rt(),at(),Ge(),ke(),Je(),Re(),ut(),ht(),_t(),w();function Rt(e){let t=v().numStartups;f(n=>{let r=n.tipsHistory??{};return r[e]===t?n:{...n,tipsHistory:{...r,[e]:t}}})}function J(e){let t=v(),n=t.tipsHistory?.[e];return n?t.numStartups-n:1/0}E(),l(),w(),M(),k(),g();var Y;async function zt(){return Y===void 0&&(Y=z in await He()),Y}async function X(e,t,n){if(!await zt()||Pe(`${e}@claude-plugins-official`))return!1;let{bashTools:r}=t??{};return!!(n.cli&&r?.size&&n.cli.some(e=>r.has(e))||n.filePath&&t?.readFileState&&nt(t.readFileState).some(e=>n.filePath.test(e)))}var Bt=[{id:`new-user-warmup`,content:async()=>`Start with small features or bug fixes, tell Claude to propose a plan, and verify its suggested edits`,cooldownSessions:3,async isRelevant(){return v().numStartups<10}},{id:`plan-mode-for-complex-tasks`,content:async()=>`Use Plan Mode to prepare for a complex request before making changes. Press ${B(`chat:cycleMode`,`Chat`,`shift+tab`)} twice to enable.`,cooldownSessions:5,isRelevant:async()=>{let e=v();return(e.lastPlanModeUse?(Date.now()-e.lastPlanModeUse)/(1e3*60*60*24):1/0)>7}},{id:`default-permission-mode-config`,content:async()=>`Use /config to change your default permission mode (including Plan Mode)`,cooldownSessions:10,isRelevant:async()=>{try{let e=v(),t=b(),n=!!e.lastPlanModeUse,r=!!t?.permissions?.defaultMode;return n&&!r}catch(e){return D(`Failed to check default-permission-mode-config tip relevance: ${e}`,{level:`warn`}),!1}}},{id:`git-worktrees`,content:async()=>`Use git worktrees to run multiple Claude sessions in parallel.`,cooldownSessions:10,isRelevant:async()=>{try{let e=v();return await be()<=1&&e.numStartups>50}catch{return!1}}},{id:`color-when-multi-clauding`,content:async()=>`Running multiple Claude sessions? Use /color and /rename to tell them apart at a glance.`,cooldownSessions:10,isRelevant:async()=>Ze()?!1:await Xe()>=2},{id:`terminal-setup`,content:async()=>N.terminal===`Apple_Terminal`?`Run /terminal-setup to enable convenient terminal integration like Option + Enter for new line and more`:`Run /terminal-setup to enable convenient terminal integration like Shift + Enter for new line and more`,cooldownSessions:10,async isRelevant(){let e=v();return N.terminal===`Apple_Terminal`?!e.optionAsMetaKeyInstalled:!e.shiftEnterKeyBindingInstalled}},{id:`shift-enter`,content:async()=>N.terminal===`Apple_Terminal`?`Press Option+Enter to send a multi-line message`:`Press Shift+Enter to send a multi-line message`,cooldownSessions:10,async isRelevant(){let e=v();return!!((N.terminal===`Apple_Terminal`?e.optionAsMetaKeyInstalled:e.shiftEnterKeyBindingInstalled)&&e.numStartups>3)}},{id:`shift-enter-setup`,content:async()=>N.terminal===`Apple_Terminal`?`Run /terminal-setup to enable Option+Enter for new lines`:`Run /terminal-setup to enable Shift+Enter for new lines`,cooldownSessions:10,async isRelevant(){if(!ot())return!1;let e=v();return!(N.terminal===`Apple_Terminal`?e.optionAsMetaKeyInstalled:e.shiftEnterKeyBindingInstalled)}},{id:`memory-command`,content:async()=>`Use /memory to view and manage Claude memory`,cooldownSessions:15,async isRelevant(){return v().memoryUsageCount<=0}},{id:`theme-command`,content:async()=>`Use /theme to change the color theme`,cooldownSessions:20,isRelevant:async()=>!0},{id:`colorterm-truecolor`,content:async()=>`Try setting environment variable COLORTERM=truecolor for richer colors`,cooldownSessions:30,isRelevant:async()=>!process.env.COLORTERM&&a.level<3},{id:`powershell-tool-env`,content:async()=>`Set CLAUDE_CODE_USE_POWERSHELL_TOOL=1 to enable the PowerShell tool (preview)`,cooldownSessions:10,isRelevant:async()=>I()===`windows`&&process.env.CLAUDE_CODE_USE_POWERSHELL_TOOL===void 0},{id:`status-line`,content:async()=>`Use /statusline to set up a custom status line that will display beneath the input box`,cooldownSessions:25,isRelevant:async()=>b().statusLine===void 0},{id:`prompt-queue`,content:async()=>`Hit Enter to queue up additional messages while Claude is working.`,cooldownSessions:5,async isRelevant(){return v().promptQueueUseCount<=3}},{id:`enter-to-steer-in-relatime`,content:async()=>`Send messages to Claude while it works to steer Claude in real-time`,cooldownSessions:20,isRelevant:async()=>!0},{id:`todo-list`,content:async()=>`Ask Claude to create a todo list when working on complex tasks to track progress and remain on track`,cooldownSessions:20,isRelevant:async()=>!0},{id:`vscode-command-install`,content:async()=>`Open the Command Palette (Cmd+Shift+P) and run "Shell Command: Install '${N.terminal===`vscode`?`code`:N.terminal}' command in PATH" to enable IDE integration`,cooldownSessions:0,async isRelevant(){if(!Fe()||I()!==`macos`)return!1;switch(N.terminal){case`vscode`:return!await Le();case`cursor`:return!await ze();case`windsurf`:return!await Be();default:return!1}}},{id:`ide-upsell-external-terminal`,content:async()=>`Connect Claude to your IDE · /ide`,cooldownSessions:4,async isRelevant(){return Ne()||(await je()).length!==0?!1:(await Qe()).length>0}},{id:`install-github-app`,content:async()=>`Run /install-github-app to tag @claude right from your Github issues and PRs`,cooldownSessions:10,isRelevant:async()=>!v().githubActionSetupCount},{id:`install-slack-app`,content:async()=>`Run /install-slack-app to use Claude in Slack`,cooldownSessions:10,isRelevant:async()=>!v().slackAppInstallCount},{id:`permissions`,content:async()=>`Use /permissions to pre-approve and pre-deny bash, edit, and MCP tools`,cooldownSessions:10,async isRelevant(){return v().numStartups>10}},{id:`drag-and-drop-images`,content:async()=>`Did you know you can drag and drop image files into your terminal?`,cooldownSessions:10,isRelevant:async()=>!N.isSSH()},{id:`paste-images-mac`,content:async()=>`Paste images into Claude Code using control+v (not cmd+v!)`,cooldownSessions:10,isRelevant:async()=>I()===`macos`},{id:`double-esc`,content:async()=>`Double-tap esc to rewind the conversation to a previous point in time`,cooldownSessions:10,isRelevant:async()=>!V()},{id:`double-esc-code-restore`,content:async()=>`Double-tap esc to rewind the code and/or conversation to a previous point in time`,cooldownSessions:10,isRelevant:async()=>V()},{id:`continue`,content:async()=>`Run claude --continue or claude --resume to resume a conversation`,cooldownSessions:10,isRelevant:async()=>!0},{id:`rename-conversation`,content:async()=>`Name your conversations with /rename to find them easily in /resume later`,cooldownSessions:15,isRelevant:async()=>Ie()&&v().numStartups>10},{id:`custom-commands`,content:async()=>`Create skills by adding .md files to .claude/skills/ in your project or ~/.claude/skills/ for skills that work in any project`,cooldownSessions:15,async isRelevant(){return v().numStartups>10}},{id:`shift-tab`,content:async()=>`Hit ${B(`chat:cycleMode`,`Chat`,`shift+tab`)} to cycle between default, accept edits, plan, auto, and bypass modes`,cooldownSessions:10,isRelevant:async()=>!0},{id:`image-paste`,content:async()=>`Use ${B(`chat:imagePaste`,`Chat`,`ctrl+v`)} to paste images from your clipboard`,cooldownSessions:20,isRelevant:async()=>!0},{id:`custom-agents`,content:async()=>`Use /agents to optimize specific tasks. Eg. Software Architect, Code Writer, Code Reviewer`,cooldownSessions:15,async isRelevant(){return v().numStartups>5}},{id:`agent-flag`,content:async()=>`Use --agent <agent_name> to directly start a conversation with a subagent`,cooldownSessions:15,async isRelevant(){return v().numStartups>5}},{id:`desktop-app`,content:async()=>`Run Claude Code locally or remotely using the Claude desktop app: clau.de/desktop`,cooldownSessions:15,isRelevant:async()=>I()!==`linux`},{id:`desktop-shortcut`,content:async e=>`Continue your session in Claude Code Desktop with ${u(`suggestion`,e?.theme??`dark`)(`/desktop`)}`,cooldownSessions:15,isRelevant:async()=>q().enable_shortcut_tip?process.platform===`darwin`||process.platform===`win32`&&process.arch===`x64`:!1},{id:`web-app`,content:async()=>`Run tasks in the cloud while you keep coding locally · clau.de/web`,cooldownSessions:15,isRelevant:async()=>!0},{id:`mobile-app`,content:async()=>`/mobile to use Claude Code from the Claude app on your phone`,cooldownSessions:15,isRelevant:async()=>!0},{id:`opusplan-mode-reminder`,content:async()=>`Your default model setting is Opus Plan Mode. Press ${B(`chat:cycleMode`,`Chat`,`shift+tab`)} twice to activate Plan Mode and plan with Claude Opus.`,cooldownSessions:2,async isRelevant(){if(process.env.USER_TYPE===`ant`)return!1;let e=v(),t=h()===`opusplan`,n=e.lastPlanModeUse?(Date.now()-e.lastPlanModeUse)/(1e3*60*60*24):1/0;return t&&n>3}},{id:`frontend-design-plugin`,content:async e=>`Working with HTML/CSS? Install the frontend-design plugin:\n${u(`suggestion`,e?.theme??`dark`)(`/plugin install frontend-design@${z}`)}`,cooldownSessions:3,isRelevant:async e=>X(`frontend-design`,e,{filePath:/\.(html|css|htm)$/i})},{id:`vercel-plugin`,content:async e=>`Working with Vercel? Install the vercel plugin:\n${u(`suggestion`,e?.theme??`dark`)(`/plugin install vercel@${z}`)}`,cooldownSessions:3,isRelevant:async e=>X(`vercel`,e,{filePath:/(?:^|[/\\])vercel\.json$/i,cli:[`vercel`]})},{id:`effort-high-nudge`,content:async e=>{let t=u(`suggestion`,e?.theme??`dark`)(`/effort high`);return _(`tengu_tide_elm`,`off`)===`copy_b`?`Use ${t} for better one-shot answers. Claude thinks it through first.`:`Working on something tricky? ${t} gives better first answers`},cooldownSessions:3,isRelevant:async()=>{if(!S()||!Ae(te())||ie(`policySettings`)?.effortLevel!==void 0||We()!==void 0)return!1;let e=m().effortLevel;return e===`high`||e===`max`?!1:_(`tengu_tide_elm`,`off`)!==`off`}},{id:`subagent-fanout-nudge`,content:async e=>{let t=u(`suggestion`,e?.theme??`dark`);return _(`tengu_tern_alloy`,`off`)===`copy_b`?`For big tasks, tell Claude to ${t(`use subagents`)}. They work in parallel and keep your main thread clean.`:`Say ${t(`"fan out subagents"`)} and Claude sends a team. Each one digs deep so nothing gets missed.`},cooldownSessions:3,isRelevant:async()=>S()?_(`tengu_tern_alloy`,`off`)!==`off`:!1},{id:`loop-command-nudge`,content:async e=>{let t=u(`suggestion`,e?.theme??`dark`);return _(`tengu_timber_lark`,`off`)===`copy_b`?`Use ${t(`/loop 5m check the deploy`)} to run any prompt on a schedule. Set it and forget it.`:`${t(`/loop`)} runs any prompt on a recurring schedule. Great for monitoring deploys, babysitting PRs, or polling status.`},cooldownSessions:3,isRelevant:async()=>!S()||!tt()?!1:_(`tengu_timber_lark`,`off`)!==`off`},{id:`guest-passes`,content:async e=>{let t=u(`claude`,e?.theme??`dark`),n=ct();return n?`Share Claude Code and earn ${t(lt(n))} of extra usage · ${t(`/passes`)}`:`You have free guest passes to share · ${t(`/passes`)}`},cooldownSessions:3,isRelevant:async()=>{if(v().hasVisitedPasses)return!1;let{eligible:e}=dt();return e}},{id:`overage-credit`,content:async e=>{let t=u(`claude`,e?.theme??`dark`),n=mt(),r=n?gt(n):null;return r?`${t(`${r} in extra usage, on us`)} · third-party apps · ${t(`/extra-usage`)}`:``},cooldownSessions:3,isRelevant:async()=>vt()},{id:`feedback-command`,content:async()=>`Use /feedback to help us improve!`,cooldownSessions:15,async isRelevant(){return process.env.USER_TYPE===`ant`?!1:v().numStartups>5}}],Vt=process.env.USER_TYPE===`ant`?[{id:`important-claudemd`,content:async()=>`[ANT-ONLY] Use "IMPORTANT:" prefix for must-follow CLAUDE.md rules`,cooldownSessions:30,isRelevant:async()=>!0},{id:`skillify`,content:async()=>`[ANT-ONLY] Use /skillify at the end of a workflow to turn it into a reusable skill`,cooldownSessions:15,isRelevant:async()=>!0}]:[];function Ht(){let e=m().spinnerTipsOverride;return e?.tips?.length?e.tips.map((e,t)=>({id:`custom-tip-${t}`,content:async()=>e,cooldownSessions:0,isRelevant:async()=>!0})):[]}async function Ut(e){let t=m().spinnerTipsOverride,n=Ht();if(t?.excludeDefault&&n.length>0)return n;let r=[...Bt,...Vt],i=await Promise.all(r.map(t=>t.isRelevant?.(e)??Promise.resolve(!0)));return[...r.filter((e,t)=>i[t]).filter(e=>J(e.id)>=e.cooldownSessions),...n]}E(),P(),Ee(),Oe();var Z=2e3,Q=5,Wt=3e4,$=3,Gt=new Set([4003]);function Kt(e){return typeof e!=`object`||!e||!(`type`in e)?!1:typeof e.type==`string`}var qt=class{constructor(e,t,n,r){i(this,`ws`,null),i(this,`state`,`closed`),i(this,`reconnectAttempts`,0),i(this,`sessionNotFoundRetries`,0),i(this,`pingInterval`,null),i(this,`reconnectTimer`,null),this.sessionId=e,this.orgUuid=t,this.getAccessToken=n,this.callbacks=r}async connect(){if(this.state===`connecting`){D(`[SessionsWebSocket] Already connecting`);return}this.state=`connecting`;let e=`${A().BASE_API_URL.replace(`http`,`ws`)}/v1/sessions/ws/${this.sessionId}/subscribe?organization_uuid=${this.orgUuid}`;D(`[SessionsWebSocket] Connecting to ${e}`);let t={Authorization:`Bearer ${this.getAccessToken()}`,"anthropic-version":`2023-06-01`};if(typeof Bun<`u`){let n=new globalThis.WebSocket(e,{headers:t,proxy:De(e),tls:R()||void 0});this.ws=n,n.addEventListener(`open`,()=>{D(`[SessionsWebSocket] Connection opened, authenticated via headers`),this.state=`connected`,this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),n.addEventListener(`message`,e=>{let t=typeof e.data==`string`?e.data:String(e.data);this.handleMessage(t)}),n.addEventListener(`error`,()=>{let e=Error(`[SessionsWebSocket] WebSocket error`);F(e),this.callbacks.onError?.(e)}),n.addEventListener(`close`,e=>{D(`[SessionsWebSocket] Closed: code=${e.code} reason=${e.reason}`),this.handleClose(e.code)}),n.addEventListener(`pong`,()=>{D(`[SessionsWebSocket] Pong received`)})}else{let{default:n}=await import(`./wrapper-BSK0MCQH.js`),r=new n(e,{headers:t,agent:Te(e),...R()});this.ws=r,r.on(`open`,()=>{D(`[SessionsWebSocket] Connection opened, authenticated via headers`),this.state=`connected`,this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),r.on(`message`,e=>{this.handleMessage(e.toString())}),r.on(`error`,e=>{F(Error(`[SessionsWebSocket] Error: ${e.message}`)),this.callbacks.onError?.(e)}),r.on(`close`,(e,t)=>{D(`[SessionsWebSocket] Closed: code=${e} reason=${t.toString()}`),this.handleClose(e)}),r.on(`pong`,()=>{D(`[SessionsWebSocket] Pong received`)})}}handleMessage(e){try{let t=de(e);Kt(t)?this.callbacks.onMessage(t):D(`[SessionsWebSocket] Ignoring message type: ${typeof t==`object`&&t&&`type`in t?String(t.type):`unknown`}`)}catch(e){F(Error(`[SessionsWebSocket] Failed to parse message: ${me(e)}`))}}handleClose(e){if(this.stopPingInterval(),this.state===`closed`)return;this.ws=null;let t=this.state;if(this.state=`closed`,Gt.has(e)){D(`[SessionsWebSocket] Permanent close code ${e}, not reconnecting`),this.callbacks.onClose?.();return}if(e===4001){if(this.sessionNotFoundRetries++,this.sessionNotFoundRetries>$){D(`[SessionsWebSocket] 4001 retry budget exhausted (${$}), not reconnecting`),this.callbacks.onClose?.();return}this.scheduleReconnect(Z*this.sessionNotFoundRetries,`4001 attempt ${this.sessionNotFoundRetries}/${$}`);return}t===`connected`&&this.reconnectAttempts<Q?(this.reconnectAttempts++,this.scheduleReconnect(Z,`attempt ${this.reconnectAttempts}/${Q}`)):(D(`[SessionsWebSocket] Not reconnecting`),this.callbacks.onClose?.())}scheduleReconnect(e,t){this.callbacks.onReconnecting?.(),D(`[SessionsWebSocket] Scheduling reconnect (${t}) in ${e}ms`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},e)}startPingInterval(){this.stopPingInterval(),this.pingInterval=setInterval(()=>{if(this.ws&&this.state===`connected`)try{this.ws.ping?.()}catch{}},Wt)}stopPingInterval(){this.pingInterval&&(clearInterval(this.pingInterval),this.pingInterval=null)}sendControlResponse(e){if(!this.ws||this.state!==`connected`){F(Error(`[SessionsWebSocket] Cannot send: not connected`));return}D(`[SessionsWebSocket] Sending control response`),this.ws.send(T(e))}sendControlRequest(e){if(!this.ws||this.state!==`connected`){F(Error(`[SessionsWebSocket] Cannot send: not connected`));return}let t={type:`control_request`,request_id:xt(),request:e};D(`[SessionsWebSocket] Sending control request: ${e.subtype}`),this.ws.send(T(t))}isConnected(){return this.state===`connected`}close(){D(`[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(){D(`[SessionsWebSocket] Force reconnecting`),this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.close(),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},500)}};E(),P(),r();function Jt(e){return e.type!==`control_request`&&e.type!==`control_response`&&e.type!==`control_cancel_request`}var Yt=class{constructor(e,t){i(this,`websocket`,null),i(this,`pendingPermissionRequests`,new Map),this.config=e,this.callbacks=t}connect(){D(`[RemoteSessionManager] Connecting to session ${this.config.sessionId}`),this.websocket=new qt(this.config.sessionId,this.config.orgUuid,this.config.getAccessToken,{onMessage:e=>this.handleMessage(e),onConnected:()=>{D(`[RemoteSessionManager] Connected`),this.callbacks.onConnected?.()},onClose:()=>{D(`[RemoteSessionManager] Disconnected`),this.callbacks.onDisconnected?.()},onReconnecting:()=>{D(`[RemoteSessionManager] Reconnecting`),this.callbacks.onReconnecting?.()},onError:e=>{F(e),this.callbacks.onError?.(e)}}),this.websocket.connect()}handleMessage(e){if(e.type===`control_request`){this.handleControlRequest(e);return}if(e.type===`control_cancel_request`){let{request_id:t}=e,n=this.pendingPermissionRequests.get(t);D(`[RemoteSessionManager] Permission request cancelled: ${t}`),this.pendingPermissionRequests.delete(t),this.callbacks.onPermissionCancelled?.(t,n?.tool_use_id);return}if(e.type===`control_response`){D(`[RemoteSessionManager] Received control response`);return}Jt(e)&&this.callbacks.onMessage(e)}handleControlRequest(e){let t=e.request_id,n=e.request;if(n.subtype===`can_use_tool`)D(`[RemoteSessionManager] Permission request for tool: ${n.tool_name}`),this.pendingPermissionRequests.set(t,n),this.callbacks.onPermissionRequest(n,t);else{D(`[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){D(`[RemoteSessionManager] Sending message to session ${this.config.sessionId}`);let n=await it(this.config.sessionId,e,t);return n||F(Error(`[RemoteSessionManager] Failed to send message to session ${this.config.sessionId}`)),n}respondToPermissionRequest(e,t){if(!this.pendingPermissionRequests.get(e)){F(Error(`[RemoteSessionManager] No pending permission request with ID: ${e}`));return}this.pendingPermissionRequests.delete(e);let n={type:`control_response`,response:{subtype:`success`,request_id:e,response:{behavior:t.behavior,...t.behavior===`allow`?{updatedInput:t.updatedInput}:{message:t.message}}}};D(`[RemoteSessionManager] Sending permission response: ${t.behavior}`),this.websocket?.sendControlResponse(n)}isConnected(){return this.websocket?.isConnected()??!1}cancelSession(){D(`[RemoteSessionManager] Sending interrupt signal`),this.websocket?.sendControlRequest({subtype:`interrupt`})}getSessionId(){return this.config.sessionId}disconnect(){D(`[RemoteSessionManager] Disconnecting`),this.websocket?.close(),this.websocket=null,this.pendingPermissionRequests.clear()}reconnect(){D(`[RemoteSessionManager] Reconnecting WebSocket`),this.websocket?.reconnect()}};function Xt(e,t,n,r=!1,i=!1){return{sessionId:e,getAccessToken:t,orgUuid:n,hasInitialPrompt:r,viewerOnly:i}}export{Rt as a,Nt as c,St as d,Ct as f,J as i,kt as l,Xt as n,Lt as o,Ut as r,It as s,Yt as t,At as u};
|
|
@@ -1 +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-
|
|
1
|
+
import{a as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Rn as r,b as i,t as a,tn as ee,tt as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{cn as l,jr as te,ot as ne}from"./state-sIHsFpDu.js";import{n as u,r as d}from"./analytics-DqMQntaB.js";import{o as f,s as p}from"./log-DSV4Ht5l.js";import{$n as re,Ai as m,Am as ie,Co as ae,Fr as h,Jv as g,KE as oe,Kr as _,Ky as v,Lr as se,RE as y,Uo as b,Wy as x,Yv as ce,Zr as S,_i as C,ai as w,fC as le,gi as ue,id as de,km as T,lC as E,o as fe,qE as D,rd as pe,u as me,uC as he,ur as ge,wd as _e,yd as O,zE as k}from"./loadAgentsDir-BYWykYwn.js";import{t as A}from"./useKeybinding-DPOUuymz.js";import{t as j}from"./useTerminalSize-Du-EamDN.js";import{r as M}from"./asciicast-C_1Pi99k.js";import{a as N,n as P,s as F}from"./skillChangeDetector-1aFn40GC.js";import{a as I,i as L,n as R,o as z,r as ve,t as ye}from"./crossProjectResume-BFlsTYOq.js";import{t as be}from"./REPL-CXcCBQuz.js";import{dirname as xe}from"path";var B=t(r(),1);j(),l(),z(),v(),T(),a(),A(),u(),E(),D(),L(),O(),g(),R(),f(),b(),h();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:g=!1,systemPrompt:v,appendSystemPrompt:b,initialSearchQuery:T,disableSlashCommands:E=!1,forkSession:D,taskListId:O,filterByPr:A,thinkingConfig:j,onTurnComplete:L}){let{rows:R}=n(),z=he(e=>e.agentDefinitions),H=le(),[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(A!==void 0){if(A===!0)e=e.filter(e=>e.prNumber!==void 0);else if(typeof A==`number`)e=e.filter(e=>e.prNumber===A);else if(typeof A==`string`){let t=Se(A);t!==null&&(e=e.filter(e=>e.prNumber===t))}}return e},[U,A]),je=se();B.useEffect(()=>{S(r).then(e=>{Y.current=e,X.current=e.logs.length,W(e.logs),G(!1)}).catch(e=>{p(e),G(!1)})},[r]);let Q=B.useCallback(e=>{let t=Y.current;!t||t.nextIndex>=t.allStatLogs.length||ge(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?_():S(r)).then(e=>{Y.current=e,X.current=e.logs.length,W(e.logs)}).catch(e=>{p(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=ye(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 ce(t,void 0);if(!r)throw Error(`Failed to load conversation`);{let t=(k(),e(y)).matchSessionMode(r.mode);if(t){let{getAgentDefinitionsWithOverrides:n,getActiveAgentsFromList:i}=(fe(),e(me));n.cache.clear?.();let a=await n(ne());H(e=>({...e,agentDefinitions:{...a,allAgents:a.allAgents,activeAgents:i(a.allAgents)}})),r.messages.push(ae(t,`warning`))}}r.sessionId&&!D?(te(oe(r.sessionId),t.fullPath?xe(t.fullPath):null),await M(),await ue(),ie(r.sessionId)):D&&r.contentReplacements?.length&&await w(r.contentReplacements);let{agentDefinition:i}=N(r.agentSetting,u,z);H(e=>({...e,agent:i?.agentType}));{let{saveMode:t}=(h(),e(m)),{isCoordinatorMode:n}=(k(),e(y));t(n()?`coordinator`:`normal`)}let a=P(r.agentName,r.agentColor);if(a&&H(e=>({...e,standaloneAgentContext:a})),_e(r.agentName),C(D?{...r,worktreeSession:void 0}:r),D||(F(r.worktreeSession),r.sessionId&&re()),r.goal&&r.sessionId){let{hydrateGoalFromTranscript:t}=(de(),e(pe)),n=new Map;n.set(r.sessionId,r.goal),t(n,r.sessionId)}d(`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 d(`tengu_session_resumed`,{entrypoint:`picker`,success:!1}),p(e),e}}return J?(0,V.jsx)(we,{command:J}):q?(0,V.jsx)(be,{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:g,systemPrompt:v,appendSystemPrompt:b,mainThreadAgentDefinition:q.mainThreadAgentDefinition,autoConnectIdeFlag:f,disableSlashCommands:E,taskListId:O,thinkingConfig:j,onTurnComplete:L}):Te?(0,V.jsxs)(s,{children:[(0,V.jsx)(x,{}),(0,V.jsx)(i,{children:` Loading conversations…`})]}):Ee?(0,V.jsxs)(s,{children:[(0,V.jsx)(x,{}),(0,V.jsx)(i,{children:` Resuming conversation…`})]}):Z.length===0?(0,V.jsx)(Ce,{}):(0,V.jsx)(I,{logs:Z,maxHeight:R,onCancel:Ne,onSelect:Pe,onLogsChanged:je?()=>$(K):void 0,onLoadMore:Q,initialSearchQuery:T,showAllProjects:K,onToggleAllProjects:Me,onAgenticSearch:ve})}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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-80gRi2ZW.js";import{n as r,t as i}from"./axios-DhfaybwJ.js";import{At as a,jt as o}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-80gRi2ZW.js";import{n as r,t as i}from"./axios-DhfaybwJ.js";import{At as a,jt as o}from"./paths-BZjPDxMm.js";import{D as s,E as c,O as l,U as u,l as d,p as f,z as p}from"./debug-otxXY3j-.js";import{F as m,P as h}from"./git-C0IuvuIy.js";import{n as g,t as _}from"./sleep-C6koP5Ka.js";import{E as v,O as y,n as b,t as x}from"./rcDebugLog-ClX1msJX.js";function S(){return!0}function C(e){let t=[],n=0,r=/\r?\n\r?\n/g;r.lastIndex=n;let i;for(;(i=r.exec(e))!==null;){let r=i.index,a=e.slice(n,r);if(n=r+i[0].length,!a.trim())continue;let o={},s=!1;for(let e of a.split(`
|
|
2
2
|
`)){let t=e[e.length-1]===`\r`?e.slice(0,-1):e;if(t.startsWith(`:`)){s=!0;continue}let n=t.indexOf(`:`);if(n===-1)continue;let r=t.slice(0,n),i=t[n+1]===` `?t.slice(n+2):t.slice(n+1);switch(r){case`event`:o.event=i;break;case`id`:o.id=i;break;case`data`:o.data=o.data?o.data+`
|
|
3
3
|
`+i:i;break}}(o.data||s)&&t.push(o)}return{frames:t,remaining:e.slice(n)}}function w(e){let t=e.pathname;return t.endsWith(`/stream`)&&(t=t.slice(0,-7)),`${e.protocol}//${e.host}${t}`}var T,E,D,O,k,A,j,M,N,P,F=e((()=>{i(),d(),x(),h(),u(),y(),_(),c(),o(),t(),T=1e3,E=3e4,D=6e5,O=45e3,k=new Set([401,403,404]),A=10,j=500,M=8e3,N={stream:!0},P=class{constructor(e,t={},r,i,a,o){n(this,`state`,`idle`),n(this,`onData`,void 0),n(this,`onCloseCallback`,void 0),n(this,`onEventCallback`,void 0),n(this,`headers`,void 0),n(this,`sessionId`,void 0),n(this,`refreshHeaders`,void 0),n(this,`getAuthHeaders`,void 0),n(this,`abortController`,null),n(this,`lastSequenceNum`,0),n(this,`seenSequenceNums`,new Set),n(this,`reconnectAttempts`,0),n(this,`reconnectStartTime`,null),n(this,`reconnectTimer`,null),n(this,`livenessTimer`,null),n(this,`lastActivityTime`,0),n(this,`postUrl`,void 0),n(this,`onLivenessTimeout`,()=>{this.livenessTimer=null,b(`SSE liveness timeout (${O}ms) lastSeqNum=${this.getLastSequenceNum()} state=${this.state}`),f(`SSETransport: Liveness timeout, reconnecting`,{level:`error`}),m(`error`,`cli_sse_liveness_timeout`),this.abortController?.abort(),this.handleConnectionError()}),this.url=e,this.headers=t,this.sessionId=r,this.refreshHeaders=i,this.getAuthHeaders=o??v,this.postUrl=w(e),a!==void 0&&a>0&&(this.lastSequenceNum=a),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":a()};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=k.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,N),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}=C(r);r=s;for(let e of o){if(this.resetLivenessTimer(),e.id){let t=parseInt(e.id,10);if(!isNaN(t)){if(this.seenSequenceNums.has(t))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
4
|
`)}else f(`SSETransport: Ignoring client_event with no type in payload: event_id=${n.event_id}`);this.onEventCallback?.(n)}handleConnectionError(){if(b(`SSE handleConnectionError: state=${this.state} lastSeqNum=${this.getLastSequenceNum()} reconnectAttempts=${this.reconnectAttempts} msSinceLastActivity=${this.lastActivityTime>0?Date.now()-this.lastActivityTime:-1}`),this.clearLivenessTimer(),this.state===`closing`||this.state===`closed`)return;this.abortController?.abort(),this.abortController=null;let e=Date.now();this.reconnectStartTime||(this.reconnectStartTime=e);let t=e-this.reconnectStartTime;if(t<D){if(this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.refreshHeaders){let e=this.refreshHeaders();Object.assign(this.headers,e),f(`SSETransport: Refreshed headers for reconnect`)}this.state=`reconnecting`,this.reconnectAttempts++;let e=Math.min(T*2**(this.reconnectAttempts-1),E),n=Math.max(0,e+e*.25*(2*Math.random()-1));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,O)}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 n={...t,"Content-Type":`application/json`,"anthropic-version":`2023-06-01`,"User-Agent":a()};f(`SSETransport: POST body keys=${Object.keys(e).join(`,`)}`);for(let t=1;t<=A;t++){try{let i=await r.post(this.postUrl,e,{headers:n,validateStatus:S});if(i.status===200||i.status===201){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}/${A}`),m(`warn`,`cli_sse_post_retryable_error`,{status:i.status,attempt:t})}catch(e){f(`SSETransport: POST error: ${e.message}, attempt ${t}/${A}`),m(`warn`,`cli_sse_post_network_error`,{attempt:t})}if(t===A){f(`SSETransport: POST failed after ${A} attempts, continuing`),m(`warn`,`cli_sse_post_retries_exhausted`);return}await g(Math.min(j*2**(t-1),M))}}isConnectedStatus(){return this.state===`connected`}isClosedStatus(){return this.state===`closed`}setOnData(e){this.onData=e}setOnClose(e){this.onCloseCallback=e}setOnEvent(e){this.onEventCallback=e}close(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.clearLivenessTimer(),this.state=`closing`,this.abortController?.abort(),this.abortController=null}}}));export{F as n,C as r,P as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{t}from"./src-Di342QoJ.js";var n=e((()=>{t()}));export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hk as e,mk as t}from"./loadAgentsDir-BYWykYwn.js";e();export{t as clearSearchExtraToolsDescriptionCache};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./SentryErrorBoundary-ydwbrVTx.js";e();export{t as SentryErrorBoundary};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,t as i,x as a}from"./src-
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,t as i,x as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{o as s,s as c}from"./log-DSV4Ht5l.js";import{i as l,t as u}from"./sentry-BBCn6RGP.js";var d,f,p,m=e((()=>{d=t(n(),1),i(),l(),s(),f=o(),p=class extends d.Component{constructor(e){super(e),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){this.setState({errorInfo:t});let n=this.props.name||`SentryErrorBoundary`,r=[``,`[ErrorBoundary:${n}] React rendering error caught`,` Message: ${e.message}`];t.componentStack&&r.push(` Component stack:\n${t.componentStack}`),console.error(r.join(`
|
|
2
2
|
`)),c(e),u(e,{componentBoundary:n,componentStack:t.componentStack})}render(){return this.state.hasError?(0,f.jsxs)(a,{flexDirection:`column`,paddingX:1,paddingY:1,children:[(0,f.jsx)(r,{color:`error`,bold:!0,children:`React Rendering Error`}),(0,f.jsx)(r,{color:`error`,children:this.state.error?.message}),this.props.name&&(0,f.jsxs)(r,{dimColor:!0,children:[`Boundary: `,this.props.name]})]}):this.props.children}}}));export{m as n,p as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,n as t,o as n}from"./chunk-DR8-3Aex.js";import{f as r,s as i,u as a}from"./envUtils-BWeoiL4Y.js";import{n as o,t as s}from"./figures-gfT9mM8P.js";import{E as c,F as ee,In as l,Ln as u,Rn as d,T as te,Ut as ne,_ as re,b as f,c as ie,f as ae,g as p,h as m,i as oe,n as se,nt as ce,p as le,r as ue,t as h,tt as de,x as g}from"./src-KjMLauwe.js";import{t as _}from"./jsx-runtime-D-D469L8.js";import{Ct as v,cn as y,kr as fe,tn as pe}from"./state-sIHsFpDu.js";import{As as me,Cc as b,Ds as he,Ka as ge,Lr as _e,Pr as x,Qa as ve,Rr as ye,S as be,Si as xe,Ss as S,Ts as Se,Xi as Ce,Zi as we,_ as Te,_c as Ee,cc as De,dc as C,di as Oe,it as ke,lc as Ae,li as je,lo as w,on as Me,oo as T,rt as Ne,sc as Pe,tn as Fe,ui as Ie,vi as E,ws as Le,xi as Re,yc as ze,yi as Be}from"./paths-4ZWdjPP4.js";import{E as D,O as Ve}from"./debug-otxXY3j-.js";import{n as O,r as k}from"./analytics-DqMQntaB.js";import{n as A,t as He}from"./cwd--iizewsn.js";import{o as Ue,s as We}from"./log-DSV4Ht5l.js";import{i as Ge,o as Ke}from"./platform-mh9ypxS8.js";import{_ as j,x as M}from"./startupProfiler-rCtNuhXz.js";import{r as qe}from"./permissions-BsVJvaEe.js";import{$b as Je,Ax as Ye,C as Xe,CS as Ze,DC as Qe,EC as N,Em as $e,Fr as et,Fx as tt,Gu as nt,I as rt,Jk as it,Ku as P,Qb as at,Qk as F,Ry as ot,TS as st,Xk as ct,Zb as lt,Zk as ut,aS as dt,ax as ft,br as pt,dC as mt,dS as ht,ds as gt,ex as _t,fC as vt,fS as I,fp as yt,fs as bt,ix as xt,km as L,kx as St,lC as R,l_ as z,nx as Ct,oS as wt,ox as Tt,pp as Et,rx as Dt,sx as Ot,tx as kt,uC as B,u_ as At,us as V,w as jt,y as Mt}from"./loadAgentsDir-CQF8qhne.js";import{r as Nt,t as Pt}from"./poorMode-DD-q_w6Z.js";import{t as Ft}from"./useKeybinding-DOjEx42R.js";import{t as H}from"./useTerminalSize-mqo2Swmk.js";import{n as U,t as It}from"./useExitOnCtrlCDWithKeybindings-Dkcp6EkA.js";import{i as Lt,r as Rt}from"./bridgeEnabled-DR-v8AXw.js";import{a as zt,n as Bt,r as Vt}from"./teammateModeSnapshot-B1_3D1CQ.js";import{i as W,n as G,r as Ht}from"./modalContext-DxfeT_3m.js";import{n as Ut,t as Wt}from"./ThemePicker-CYL4C-F-.js";import{i as Gt,n as Kt,r as qt,t as Jt}from"./extraUsage-BNRQOkgU.js";import{n as Yt,t as Xt}from"./ClaudeMdExternalIncludesDialog-IpqqBuJs.js";import{t as Zt}from"./SearchBox-CciJ8giD.js";import{n as Qt,t as $t}from"./useSearchInput-CodP_5SB.js";import{n as en,t as tn}from"./usage-CRquq5_O.js";import{a as nn,i as rn,t as an}from"./OverageCreditUpsell-Dhm7HBuD.js";function on(){let e=v();return[{label:`Version`,value:`2.8.0`},{label:`Session name`,value:pt(e)??(0,K.jsx)(f,{dimColor:!0,children:`/rename to add a name`})},{label:`Session ID`,value:e},{label:`cwd`,value:He()},...at(),...lt()]}function sn({mainLoopModel:e,mcp:t,theme:n,context:r}){return[{label:`Model`,value:Tt(e)},...Je(t.clients,r.options.ideInstallationStatus,n),...Ct(t.clients,n),...xt(),...ft()]}async function cn(){return[...await _t(),...await kt(),...await Dt()]}function ln({value:e}){return Array.isArray(e)?(0,K.jsx)(g,{flexWrap:`wrap`,columnGap:1,flexShrink:99,children:e.map((t,n)=>(0,K.jsxs)(f,{children:[t,n<e.length-1?`,`:``]},n))}):typeof e==`string`?(0,K.jsx)(f,{children:e}):e}function un({context:e,diagnosticsPromise:t}){let n=B(e=>e.mainLoopModel),r=B(e=>e.mcp),[i]=te(),a=fn.useMemo(()=>[on(),sn({mainLoopModel:n,mcp:r,theme:i,context:e})],[n,r,i,e]),o=Ht()?1:void 0;return(0,K.jsxs)(g,{flexDirection:`column`,flexGrow:o,children:[(0,K.jsxs)(g,{flexDirection:`column`,gap:1,flexGrow:o,children:[a.map((e,t)=>e.length>0&&(0,K.jsx)(g,{flexDirection:`column`,children:e.map(({label:e,value:t},n)=>(0,K.jsxs)(g,{flexDirection:`row`,gap:1,flexShrink:0,children:[e!==void 0&&(0,K.jsxs)(f,{bold:!0,children:[e,`:`]}),(0,K.jsx)(ln,{value:t})]},n))},t)),(0,K.jsx)(pn.Suspense,{fallback:null,children:(0,K.jsx)(dn,{promise:t})})]}),(0,K.jsx)(f,{dimColor:!0,children:(0,K.jsx)(N,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})})]})}function dn({promise:e}){let t=(0,pn.use)(e);return t.length===0?null:(0,K.jsxs)(g,{flexDirection:`column`,paddingBottom:1,children:[(0,K.jsx)(f,{bold:!0,children:`System Diagnostics`}),t.map((e,t)=>(0,K.jsxs)(g,{flexDirection:`row`,gap:1,paddingX:1,children:[(0,K.jsx)(f,{color:`error`,children:s.warning}),typeof e==`string`?(0,K.jsx)(f,{wrap:`wrap`,children:e}):e]},t))]})}var fn,pn,K,mn=t((()=>{o(),fn=n(d(),1),pn=n(d(),1),y(),G(),h(),R(),A(),et(),Ot(),Qe(),K=_()}));function hn({currentVersion:e,onChoice:t}){function n(e){t(e)}function r(){t(`cancel`)}return(0,gn.jsxs)(ae,{title:`Switch to Stable Channel`,onCancel:r,color:`permission`,hideBorder:!0,hideInputGuide:!0,children:[(0,gn.jsxs)(f,{children:[`The stable channel may have an older version than what you're currently running (`,e,`).`]}),(0,gn.jsx)(f,{dimColor:!0,children:`How would you like to handle this?`}),(0,gn.jsx)(dt,{options:[{label:`Allow possible downgrade to stable version`,value:`downgrade`},{label:`Stay on current version (${e}) until stable catches up`,value:`stay`}],onChange:n})]})}var gn,_n=t((()=>{d(),h(),ot(),gn=_()}));function vn(e){return Object.entries(e).map(([e,t])=>({label:t?.name??xn,value:e,description:t?.description??Sn}))}function yn({initialStyle:e,onComplete:t,onCancel:n,isStandaloneCommand:r}){let[i,a]=(0,bn.useState)([]),[o,s]=(0,bn.useState)(!0);(0,bn.useEffect)(()=>{gt(He()).then(e=>{a(vn(e)),s(!1)}).catch(()=>{a(vn(V)),s(!1)})},[]);let c=(0,bn.useCallback)(e=>{t(e)},[t]);return(0,q.jsx)(ae,{title:`Preferred output style`,onCancel:n,hideInputGuide:!r,hideBorder:!r,children:(0,q.jsxs)(g,{flexDirection:`column`,gap:1,children:[(0,q.jsx)(g,{marginTop:1,children:(0,q.jsx)(f,{dimColor:!0,children:`This changes how Claude Code communicates with you`})}),o?(0,q.jsx)(f,{dimColor:!0,children:`Loading output styles…`}):(0,q.jsx)(dt,{options:i,onChange:c,visibleOptionCount:10,defaultValue:e})]})})}var bn,q,xn,Sn,Cn=t((()=>{d(),bn=n(d(),1),bt(),h(),A(),wt(),q=_(),xn=`Default`,Sn=`Claude completes coding tasks efficiently and provides concise responses`}));function wn({initialLanguage:e,onComplete:t,onCancel:n}){let[r,i]=(0,Tn.useState)(e),[a,o]=(0,Tn.useState)((e??``).length);de(`confirm:no`,n,{context:`Settings`});function c(){let e=r?.trim();t(e||void 0)}return(0,J.jsxs)(g,{flexDirection:`column`,gap:1,children:[(0,J.jsx)(f,{children:`Enter your preferred response and voice language:`}),(0,J.jsxs)(g,{flexDirection:`row`,gap:1,children:[(0,J.jsx)(f,{children:s.pointer}),(0,J.jsx)(ht,{value:r??``,onChange:i,onSubmit:c,focus:!0,showCursor:!0,placeholder:`e.g., Japanese, 日本語, Español${s.ellipsis}`,columns:60,cursorOffset:a,onChangeCursorOffset:o})]}),(0,J.jsx)(f,{dimColor:!0,children:`Leave empty for default (English)`})]})}var Tn,J,En=t((()=>{o(),Tn=n(d(),1),h(),Ft(),I(),J=_()}));function Dn({onClose:t,context:n,setTabsHidden:i,onIsSearchModeChange:o,contentHeight:u}){let{headerFocused:d,focusHeader:ie}=oe(),se=Ht(),[,le]=te(),ue=c(),[h,_]=(0,X.useState)(C()),v=Y.useRef(C()),[y,x]=(0,X.useState)(ge()),be=Y.useRef(ge()),[S,Ce]=(0,X.useState)(y?.outputStyle||`default`),Me=Y.useRef(S),[T,Ne]=(0,X.useState)(y?.language),Fe=Y.useRef(T),[E,ze]=(0,X.useState)(0),[D,Ve]=(0,X.useState)(0),[O,A]=(0,X.useState)(!1),He=ne(),{rows:Ue}=ee(),Ke=u??Math.min(Math.floor(Ue*.8),30),j=Math.max(5,Ke-10),M=B(e=>e.mainLoopModel),Je=B(e=>e.verbose),Ye=B(e=>e.thinkingEnabled),Ze=B(e=>Re()?e.fastMode:!1),Qe=B(e=>e.promptSuggestionEnabled),$e=Se(y?.permissions?.defaultMode??`default`),et=Xe()||Mt()===`enabled`,nt=(Et(),e(yt)).isBriefEntitled(),P=vt(),[at,F]=(0,X.useState)({}),ot=Y.useRef(Ye),[lt]=(0,X.useState)(()=>ve(`localSettings`)),[ft]=(0,X.useState)(()=>ve(`userSettings`)),pt=Y.useRef(ue),ht=mt(),[gt]=(0,X.useState)(()=>{let e=ht.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}}),[_t]=(0,X.useState)(()=>pe()),I=Y.useRef(!1),[bt,xt]=(0,X.useState)(!1),[L,R]=(0,X.useState)(null),{query:z,setQuery:Ct,cursorOffset:wt}=Qt({isActive:O&&L===null&&!d,onExit:()=>A(!1),onExitUp:ie,passthroughCtrlKeys:[`c`,`d`]}),Tt=O&&!d;Y.useEffect(()=>{o?.(Tt)},[Tt,o]);let Dt=St(n.options.mcpClients),Ot=!a(process.env.CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING),kt=Y.use(ct(!0)),At=ut(kt),V=De();function jt(e){k(`tengu_config_model_changed`,{from_model:M,to_model:e}),P(t=>({...t,mainLoopModel:e,mainLoopModelForSession:null})),F(t=>{let n=ye(e)+(Kt(e,!1,_e())?` · Billed as extra usage`:``);if(`model`in t){let{model:e,...r}=t;return{...r,model:n}}return{...t,model:n}})}function Ft(e){b(t=>({...t,verbose:e})),_({...C(),verbose:e}),P(t=>({...t,verbose:e})),F(t=>{if(`verbose`in t){let{verbose:e,...n}=t;return n}return{...t,verbose:e}})}let H=[{id:`autoCompactEnabled`,label:`Auto-compact`,value:h.autoCompactEnabled,type:`boolean`,onChange(e){b(t=>({...t,autoCompactEnabled:e})),_({...C(),autoCompactEnabled:e}),k(`tengu_auto_compact_setting_changed`,{enabled:e})}},{id:`spinnerTipsEnabled`,label:`Show tips`,value:y?.spinnerTipsEnabled??!0,type:`boolean`,onChange(e){w(`localSettings`,{spinnerTipsEnabled:e}),x(t=>({...t,spinnerTipsEnabled:e})),k(`tengu_tips_setting_changed`,{enabled:e})}},{id:`cacheWarningEnabled`,label:`Cache warnings`,value:y?.cacheWarningEnabled??!0,type:`boolean`,onChange(e){w(`localSettings`,{cacheWarningEnabled:e}),x(t=>({...t,cacheWarningEnabled:e})),k(`tengu_cache_warning_setting_changed`,{enabled:e})}},{id:`prefersReducedMotion`,label:`Reduce motion`,value:y?.prefersReducedMotion??!1,type:`boolean`,onChange(e){w(`localSettings`,{prefersReducedMotion:e}),x(t=>({...t,prefersReducedMotion:e})),P(t=>({...t,settings:{...t.settings,prefersReducedMotion:e}})),k(`tengu_reduce_motion_setting_changed`,{enabled:e})}},{id:`thinkingEnabled`,label:`Thinking mode`,value:Ye??!0,type:`boolean`,onChange(e){P(t=>({...t,thinkingEnabled:e})),w(`userSettings`,{alwaysThinkingEnabled:e?void 0:!1}),k(`tengu_thinking_toggled`,{enabled:e})}},...Re()&&Be()?[{id:`fastMode`,label:`Fast mode (${je} only)`,value:!!Ze,type:`boolean`,onChange(e){Ie(),w(`userSettings`,{fastMode:e?!0:void 0}),e?(P(e=>({...e,mainLoopModel:Oe(),mainLoopModelForSession:null,fastMode:!0})),F(e=>({...e,model:Oe(),"Fast mode":`ON`}))):(P(e=>({...e,fastMode:!1})),F(e=>({...e,"Fast mode":`OFF`})))}}]:[],...Te(`tengu_chomp_inflection`,!1)?[{id:`promptSuggestionEnabled`,label:`Prompt suggestions`,value:Qe,type:`boolean`,onChange(e){P(t=>({...t,promptSuggestionEnabled:e})),w(`userSettings`,{promptSuggestionEnabled:e?void 0:!1})}}]:[],...[{id:`poorMode`,label:`Poor mode (save tokens)`,value:(Pt(),e(Nt)).isPoorModeActive(),type:`boolean`,onChange(t){(Pt(),e(Nt)).setPoorMode(t),P(e=>({...e,promptSuggestionEnabled:!t}))}}],...process.env.USER_TYPE===`ant`?[{id:`speculationEnabled`,label:`Speculative execution`,value:h.speculationEnabled??!0,type:`boolean`,onChange(e){b(t=>t.speculationEnabled===e?t:{...t,speculationEnabled:e}),_({...C(),speculationEnabled:e}),k(`tengu_speculation_setting_changed`,{enabled:e})}}]:[],...Ot?[{id:`fileCheckpointingEnabled`,label:`Rewind code (checkpoints)`,value:h.fileCheckpointingEnabled,type:`boolean`,onChange(e){b(t=>({...t,fileCheckpointingEnabled:e})),_({...C(),fileCheckpointingEnabled:e}),k(`tengu_file_history_snapshots_setting_changed`,{enabled:e})}}]:[],{id:`verbose`,label:`Verbose output`,value:Je,type:`boolean`,onChange:Ft},{id:`terminalProgressBarEnabled`,label:`Terminal progress bar`,value:h.terminalProgressBarEnabled,type:`boolean`,onChange(e){b(t=>({...t,terminalProgressBarEnabled:e})),_({...C(),terminalProgressBarEnabled:e}),k(`tengu_terminal_progress_bar_setting_changed`,{enabled:e})}},...Te(`tengu_terminal_sidebar`,!1)?[{id:`showStatusInTerminalTab`,label:`Show status in terminal tab`,value:h.showStatusInTerminalTab??!1,type:`boolean`,onChange(e){b(t=>({...t,showStatusInTerminalTab:e})),_({...C(),showStatusInTerminalTab:e}),k(`tengu_terminal_tab_status_setting_changed`,{enabled:e})}}]:[],{id:`showTurnDuration`,label:`Show turn duration`,value:h.showTurnDuration,type:`boolean`,onChange(e){b(t=>({...t,showTurnDuration:e})),_({...C(),showTurnDuration:e}),k(`tengu_show_turn_duration_setting_changed`,{enabled:e})}},{id:`defaultPermissionMode`,label:`Default permission mode`,value:$e,options:(()=>{let e=[`default`,`plan`];return[...e,...qe.filter(t=>!e.includes(t))]})(),type:`enum`,onChange(e){let t=Se(e),n=t===`auto`?t:Le(t)?me(t):t,r=w(`userSettings`,{permissions:{...y?.permissions,defaultMode:n}});if(r.error){We(r.error);return}x(e=>({...e,permissions:{...e?.permissions,defaultMode:n}})),F(t=>({...t,defaultPermissionMode:e})),k(`tengu_config_changed`,{setting:`defaultPermissionMode`,value:e})}},...et?[{id:`useAutoModeDuringPlan`,label:`Use auto mode during plan`,value:y?.useAutoModeDuringPlan??!0,type:`boolean`,onChange(e){w(`userSettings`,{useAutoModeDuringPlan:e}),x(t=>({...t,useAutoModeDuringPlan:e})),P(e=>{let t=rt(e.toolPermissionContext);return t===e.toolPermissionContext?e:{...e,toolPermissionContext:t}}),F(t=>({...t,"Use auto mode during plan":e}))}}]:[],{id:`respectGitignore`,label:`Respect .gitignore in file picker`,value:h.respectGitignore,type:`boolean`,onChange(e){b(t=>({...t,respectGitignore:e})),_({...C(),respectGitignore:e}),k(`tengu_respect_gitignore_setting_changed`,{enabled:e})}},{id:`copyFullResponse`,label:`Always copy full response (skip /copy picker)`,value:h.copyFullResponse,type:`boolean`,onChange(e){b(t=>({...t,copyFullResponse:e})),_({...C(),copyFullResponse:e}),k(`tengu_config_changed`,{setting:`copyFullResponse`,value:String(e)})}},...st()?[{id:`copyOnSelect`,label:`Copy on select`,value:h.copyOnSelect??!0,type:`boolean`,onChange(e){b(t=>({...t,copyOnSelect:e})),_({...C(),copyOnSelect:e}),k(`tengu_config_changed`,{setting:`copyOnSelect`,value:String(e)})}}]:[],V?{id:`autoUpdatesChannel`,label:`Auto-update channel`,value:`disabled`,type:`managedEnum`,onChange(){}}:{id:`autoUpdatesChannel`,label:`Auto-update channel`,value:y?.autoUpdatesChannel??`latest`,type:`managedEnum`,onChange(){}},{id:`theme`,label:`Theme`,value:ue,type:`managedEnum`,onChange:le},{id:`notifChannel`,label:`Local notifications`,value:h.preferredNotifChannel,options:[`auto`,`iterm2`,`terminal_bell`,`iterm2_with_bell`,`kitty`,`ghostty`,`notifications_disabled`],type:`enum`,onChange(e){b(t=>({...t,preferredNotifChannel:e})),_({...C(),preferredNotifChannel:e})}},...[{id:`taskCompleteNotifEnabled`,label:`Push when idle`,value:h.taskCompleteNotifEnabled??!1,type:`boolean`,onChange(e){b(t=>({...t,taskCompleteNotifEnabled:e})),_({...C(),taskCompleteNotifEnabled:e})}},{id:`inputNeededNotifEnabled`,label:`Push when input needed`,value:h.inputNeededNotifEnabled??!1,type:`boolean`,onChange(e){b(t=>({...t,inputNeededNotifEnabled:e})),_({...C(),inputNeededNotifEnabled:e})}},{id:`agentPushNotifEnabled`,label:`Push when Claude decides`,value:h.agentPushNotifEnabled??!1,type:`boolean`,onChange(e){b(t=>({...t,agentPushNotifEnabled:e})),_({...C(),agentPushNotifEnabled:e})}}],{id:`outputStyle`,label:`Output style`,value:S,type:`managedEnum`,onChange:()=>{}},...nt?[{id:`defaultView`,label:`What you see by default`,value:y?.defaultView===void 0?`default`:String(y.defaultView),options:[`transcript`,`chat`,`default`],type:`enum`,onChange(e){let t=e===`default`?void 0:e;w(`localSettings`,{defaultView:t}),x(e=>({...e,defaultView:t}));let n=t===`chat`;P(e=>e.isBriefOnly===n?e:{...e,isBriefOnly:n}),fe(n),F(t=>({...t,"Default view":e})),k(`tengu_default_view_setting_changed`,{value:t??`unset`})}}]:[],{id:`language`,label:`Language`,value:T??`Default (English)`,type:`managedEnum`,onChange:()=>{}},{id:`editorMode`,label:`Editor mode`,value:h.editorMode===`emacs`?`normal`:h.editorMode||`normal`,options:[`normal`,`vim`],type:`enum`,onChange(e){b(t=>({...t,editorMode:e})),_({...C(),editorMode:e}),k(`tengu_editor_mode_changed`,{mode:e,source:`config_panel`})}},{id:`prStatusFooterEnabled`,label:`Show PR status footer`,value:h.prStatusFooterEnabled??!0,type:`boolean`,onChange(e){b(t=>t.prStatusFooterEnabled===e?t:{...t,prStatusFooterEnabled:e}),_({...C(),prStatusFooterEnabled:e}),k(`tengu_pr_status_footer_setting_changed`,{enabled:e})}},{id:`model`,label:`Model`,value:M===null?`Default (recommended)`:M,type:`managedEnum`,onChange:jt},...Dt?[{id:`diffTool`,label:`Diff tool`,value:h.diffTool??`auto`,options:[`terminal`,`auto`],type:`enum`,onChange(e){b(t=>({...t,diffTool:e})),_({...C(),diffTool:e}),k(`tengu_diff_tool_changed`,{tool:e,source:`config_panel`})}}]:[],...tt()?[]:[{id:`autoConnectIde`,label:`Auto-connect to IDE (external terminal)`,value:h.autoConnectIde??!1,type:`boolean`,onChange(e){b(t=>({...t,autoConnectIde:e})),_({...C(),autoConnectIde:e}),k(`tengu_auto_connect_ide_changed`,{enabled:e,source:`config_panel`})}}],...tt()?[{id:`autoInstallIdeExtension`,label:`Auto-install IDE extension`,value:h.autoInstallIdeExtension??!0,type:`boolean`,onChange(e){b(t=>({...t,autoInstallIdeExtension:e})),_({...C(),autoInstallIdeExtension:e}),k(`tengu_auto_install_ide_extension_changed`,{enabled:e,source:`config_panel`})}}]:[],{id:`claudeInChromeDefaultEnabled`,label:`Claude in Chrome enabled by default`,value:h.claudeInChromeDefaultEnabled??!0,type:`boolean`,onChange(e){b(t=>({...t,claudeInChromeDefaultEnabled:e})),_({...C(),claudeInChromeDefaultEnabled:e}),k(`tengu_claude_in_chrome_setting_changed`,{enabled:e})}},...ke()?(()=>{let e=Vt(),t=e?`Teammate mode [overridden: ${e}]`:`Teammate mode`,n=Ge()===`windows`,r=n?[`auto`,`tmux`,`windows-terminal`,`in-process`]:[`auto`,`tmux`,`in-process`];return[{id:`teammateMode`,label:t,value:h.teammateMode??`auto`,options:r,type:`enum`,onChange(e){e!==`auto`&&e!==`tmux`&&e!==`windows-terminal`&&e!==`in-process`||e===`windows-terminal`&&!n||(Bt(e),b(t=>({...t,teammateMode:e})),_({...C(),teammateMode:e}),k(`tengu_teammate_mode_changed`,{mode:e}))}},{id:`teammateDefaultModel`,label:`Default teammate model`,value:On(h.teammateDefaultModel),type:`managedEnum`,onChange(){}}]})():[],...Lt()?[{id:`remoteControlAtStartup`,label:`Enable Remote Control for all sessions`,value:h.remoteControlAtStartup===void 0?`default`:String(h.remoteControlAtStartup),options:[`true`,`false`,`default`],type:`enum`,onChange(e){if(e===`default`)b(e=>{if(e.remoteControlAtStartup===void 0)return e;let t={...e};return delete t.remoteControlAtStartup,t}),_({...C(),remoteControlAtStartup:void 0});else{let t=e===`true`;b(e=>e.remoteControlAtStartup===t?e:{...e,remoteControlAtStartup:t}),_({...C(),remoteControlAtStartup:t})}let t=Ee();P(e=>e.replBridgeEnabled===t&&!e.replBridgeOutboundOnly?e:{...e,replBridgeEnabled:t,replBridgeOutboundOnly:!1})}}]:[],...At?[{id:`showExternalIncludesDialog`,label:`External CLAUDE.md includes`,value:Ae().hasClaudeMdExternalIncludesApproved?`true`:`false`,type:`managedEnum`,onChange(){}}]:[],...process.env.ANTHROPIC_API_KEY&&!r()?[{id:`apiKey`,label:(0,Z.jsxs)(f,{children:[`Use custom API key: `,(0,Z.jsx)(f,{bold:!0,children:we(process.env.ANTHROPIC_API_KEY)})]}),searchText:`Use custom API key`,value:!!(process.env.ANTHROPIC_API_KEY&&h.customApiKeyResponses?.approved?.includes(we(process.env.ANTHROPIC_API_KEY))),type:`boolean`,onChange(e){b(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=we(process.env.ANTHROPIC_API_KEY);e?n.customApiKeyResponses={...n.customApiKeyResponses,approved:[...(n.customApiKeyResponses.approved??[]).filter(e=>e!==t),t],rejected:(n.customApiKeyResponses.rejected??[]).filter(e=>e!==t)}:n.customApiKeyResponses={...n.customApiKeyResponses,approved:(n.customApiKeyResponses.approved??[]).filter(e=>e!==t),rejected:[...(n.customApiKeyResponses.rejected??[]).filter(e=>e!==t),t]}}return n}),_(C())}}]:[]],U=Y.useMemo(()=>{if(!z)return H;let e=z.toLowerCase();return H.filter(t=>t.id.toLowerCase().includes(e)?!0:(`searchText`in t?t.searchText:t.label).toLowerCase().includes(e))},[H,z]);Y.useEffect(()=>{if(E>=U.length){let e=Math.max(0,U.length-1);ze(e),Ve(Math.max(0,e-j+1));return}Ve(e=>E<e?E:E>=e+j?E-j+1:e)},[U.length,E,j]);let It=(0,X.useCallback)(e=>{Ve(t=>e<t?e:e>=t+j?e-j+1:t)},[j]),Rt=(0,X.useCallback)(()=>{if(L!==null)return;let e=Object.entries(at).map(([e,t])=>(k(`tengu_config_changed`,{key:e,value:t}),`Set ${e} to ${l.bold(t)}`)),n=r()?void 0:process.env.ANTHROPIC_API_KEY,i=!!(n&&v.current.customApiKeyResponses?.approved?.includes(we(n))),a=!!(n&&h.customApiKeyResponses?.approved?.includes(we(n)));if(i!==a&&(e.push(`${a?`Enabled`:`Disabled`} custom API key`),k(`tengu_config_changed`,{key:`env.ANTHROPIC_API_KEY`,value:a})),h.theme!==v.current.theme&&e.push(`Set theme to ${l.bold(h.theme)}`),h.preferredNotifChannel!==v.current.preferredNotifChannel&&e.push(`Set notifications to ${l.bold(h.preferredNotifChannel)}`),S!==Me.current&&e.push(`Set output style to ${l.bold(S)}`),T!==Fe.current&&e.push(`Set response language to ${l.bold(T??`Default (English)`)}`),h.editorMode!==v.current.editorMode&&e.push(`Set editor mode to ${l.bold(h.editorMode||`emacs`)}`),h.diffTool!==v.current.diffTool&&e.push(`Set diff tool to ${l.bold(h.diffTool)}`),h.autoConnectIde!==v.current.autoConnectIde&&e.push(`${h.autoConnectIde?`Enabled`:`Disabled`} auto-connect to IDE`),h.autoInstallIdeExtension!==v.current.autoInstallIdeExtension&&e.push(`${h.autoInstallIdeExtension?`Enabled`:`Disabled`} auto-install IDE extension`),h.autoCompactEnabled!==v.current.autoCompactEnabled&&e.push(`${h.autoCompactEnabled?`Enabled`:`Disabled`} auto-compact`),h.respectGitignore!==v.current.respectGitignore&&e.push(`${h.respectGitignore?`Enabled`:`Disabled`} respect .gitignore in file picker`),h.copyFullResponse!==v.current.copyFullResponse&&e.push(`${h.copyFullResponse?`Enabled`:`Disabled`} always copy full response`),h.copyOnSelect!==v.current.copyOnSelect&&e.push(`${h.copyOnSelect?`Enabled`:`Disabled`} copy on select`),h.terminalProgressBarEnabled!==v.current.terminalProgressBarEnabled&&e.push(`${h.terminalProgressBarEnabled?`Enabled`:`Disabled`} terminal progress bar`),h.showStatusInTerminalTab!==v.current.showStatusInTerminalTab&&e.push(`${h.showStatusInTerminalTab?`Enabled`:`Disabled`} terminal tab status`),h.showTurnDuration!==v.current.showTurnDuration&&e.push(`${h.showTurnDuration?`Enabled`:`Disabled`} turn duration`),h.remoteControlAtStartup!==v.current.remoteControlAtStartup){let t=h.remoteControlAtStartup===void 0?`Reset Remote Control to default`:`${h.remoteControlAtStartup?`Enabled`:`Disabled`} Remote Control for all sessions`;e.push(t)}y?.autoUpdatesChannel!==be.current?.autoUpdatesChannel&&e.push(`Set auto-update channel to ${l.bold(y?.autoUpdatesChannel??`latest`)}`),e.length>0?t(e.join(`
|
|
2
|
-
`)):t(`Config dialog dismissed`,{display:`system`})},[L,at,h,M,S,T,y?.autoUpdatesChannel,Re()?y?.fastMode:void 0,t]),zt=(0,X.useCallback)(()=>{ue!==pt.current&&le(pt.current),b(()=>v.current);let e=lt;w(`localSettings`,{spinnerTipsEnabled:e?.spinnerTipsEnabled,prefersReducedMotion:e?.prefersReducedMotion,defaultView:e?.defaultView,outputStyle:e?.outputStyle});let t=ft;w(`userSettings`,{alwaysThinkingEnabled:t?.alwaysThinkingEnabled,fastMode:t?.fastMode,promptSuggestionEnabled:t?.promptSuggestionEnabled,autoUpdatesChannel:t?.autoUpdatesChannel,minimumVersion:t?.minimumVersion,language:t?.language,useAutoModeDuringPlan:t?.useAutoModeDuringPlan,syntaxHighlightingDisabled:t?.syntaxHighlightingDisabled,permissions:t?.permissions===void 0?void 0:{...t.permissions,defaultMode:t.permissions.defaultMode}});let n=gt;P(e=>({...e,mainLoopModel:n.mainLoopModel,mainLoopModelForSession:n.mainLoopModelForSession,verbose:n.verbose,thinkingEnabled:n.thinkingEnabled,fastMode:n.fastMode,promptSuggestionEnabled:n.promptSuggestionEnabled,isBriefOnly:n.isBriefOnly,replBridgeEnabled:n.replBridgeEnabled,replBridgeOutboundOnly:n.replBridgeOutboundOnly,settings:n.settings,toolPermissionContext:rt(e.toolPermissionContext)})),pe()!==_t&&fe(_t)},[ue,le,lt,ft,gt,_t,P]);de(`confirm:no`,(0,X.useCallback)(()=>{L===null&&(I.current&&zt(),t(`Config dialog dismissed`,{display:`system`}))},[L,zt,t]),{context:`Settings`,isActive:L===null&&!O&&!d}),de(`settings:close`,Rt,{context:`Settings`,isActive:L===null&&!O&&!d});let W=(0,X.useCallback)(()=>{let e=U[E];if(!(!e||!e.onChange)){if(e.type===`boolean`){I.current=!0,e.onChange(!e.value),e.id===`thinkingEnabled`&&(!e.value===ot.current?xt(!1):n.messages.some(e=>e.type===`assistant`)&&xt(!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`:R(`Theme`),i(!0);return;case`model`:R(`Model`),i(!0);return;case`teammateDefaultModel`:R(`TeammateModel`),i(!0);return;case`showExternalIncludesDialog`:R(`ExternalIncludes`),i(!0);return;case`outputStyle`:R(`OutputStyle`),i(!0);return;case`language`:R(`Language`),i(!0);return}if(e.id===`autoUpdatesChannel`){if(V){R(`EnableAutoUpdates`),i(!0);return}(y?.autoUpdatesChannel??`latest`)===`latest`?(R(`ChannelDowngrade`),i(!0)):(I.current=!0,w(`userSettings`,{autoUpdatesChannel:`latest`,minimumVersion:void 0}),x(e=>({...e,autoUpdatesChannel:`latest`,minimumVersion:void 0})),k(`tengu_autoupdate_channel_changed`,{channel:`latest`}));return}if(e.type===`enum`){I.current=!0;let t=(e.options.indexOf(e.value)+1)%e.options.length;e.onChange(e.options[t]);return}}},[V,U,E,y?.autoUpdatesChannel,i]),G=e=>{xt(!1);let t=Math.max(0,Math.min(U.length-1,E+e));ze(t),It(t)};return ce({"select:previous":()=>{E===0?(xt(!1),A(!0),Ve(0)):G(-1)},"select:next":()=>G(1),"scroll:lineUp":()=>G(-1),"scroll:lineDown":()=>G(1),"select:accept":W,"select:previousValue":()=>W(),"select:nextValue":()=>W(),"settings:search":()=>{A(!0),Ct(``)}},{context:`Settings`,isActive:L===null&&!O&&!d}),(0,Z.jsx)(g,{flexDirection:`column`,width:`100%`,tabIndex:0,autoFocus:!0,onKeyDown:(0,X.useCallback)(e=>{if(L===null&&!d){if(O){if(e.key===`escape`){e.preventDefault(),z.length>0?Ct(``):A(!1);return}(e.key===`return`||e.key===`down`||e.key===`wheeldown`)&&(e.preventDefault(),A(!1),ze(0),Ve(0));return}if(e.key===`left`||e.key===`right`||e.key===`tab`){e.preventDefault(),W();return}e.ctrl||e.meta||e.key===`j`||e.key===`k`||e.key===`/`||e.key.length===1&&e.key!==` `&&(e.preventDefault(),A(!0),Ct(e.key))}},[L,d,O,z,Ct,W]),children:L===`Theme`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Wt,{onThemeSelect:e=>{I.current=!0,le(e),R(null),i(!1)},onCancel:()=>{R(null),i(!1)},hideEscToCancel:!0,skipExitHandling:!0}),(0,Z.jsx)(g,{children:(0,Z.jsx)(f,{dimColor:!0,italic:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`Enter`,action:`select`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]}):L===`Model`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(qt,{initial:M,onSelect:(e,t)=>{I.current=!0,jt(e),R(null),i(!1)},onCancel:()=>{R(null),i(!1)},showFastModeNotice:Re()?Ze&&xe(M)&&Be():!1}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]}):L===`TeammateModel`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(qt,{initial:h.teammateDefaultModel??null,skipSettingsWrite:!0,headerText:`Default model for newly spawned teammates. The leader can override via the tool call's model parameter.`,onSelect:(e,t)=>{R(null),i(!1),!(h.teammateDefaultModel===void 0&&e===null)&&(I.current=!0,b(t=>t.teammateDefaultModel===e?t:{...t,teammateDefaultModel:e}),_({...C(),teammateDefaultModel:e}),F(t=>({...t,teammateDefaultModel:On(e)})),k(`tengu_teammate_default_model_changed`,{model:e}))},onCancel:()=>{R(null),i(!1)}}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]}):L===`ExternalIncludes`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Xt,{onDone:()=>{R(null),i(!1)},externalIncludes:it(kt)}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`disable external includes`})]})})]}):L===`OutputStyle`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(yn,{initialStyle:S,onComplete:e=>{I.current=!0,Ce(e??`default`),R(null),i(!1),w(`localSettings`,{outputStyle:e}),k(`tengu_output_style_changed`,{style:e??`default`,source:`config_panel`,settings_source:`localSettings`})},onCancel:()=>{R(null),i(!1)}}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]}):L===`Language`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(wn,{initialLanguage:T,onComplete:e=>{I.current=!0,Ne(e),R(null),i(!1),w(`userSettings`,{language:e}),k(`tengu_language_changed`,{language:e??`default`,source:`config_panel`})},onCancel:()=>{R(null),i(!1)}}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]}):L===`EnableAutoUpdates`?(0,Z.jsx)(ae,{title:`Enable Auto-Updates`,onCancel:()=>{R(null),i(!1)},hideBorder:!0,hideInputGuide:!0,children:V?.type===`config`?(0,Z.jsx)(dt,{options:[{label:`Enable with latest channel`,value:`latest`},{label:`Enable with stable channel`,value:`stable`}],onChange:e=>{I.current=!0,R(null),i(!1),b(e=>({...e,autoUpdates:!0})),_({...C(),autoUpdates:!0}),w(`userSettings`,{autoUpdatesChannel:e,minimumVersion:void 0}),x(t=>({...t,autoUpdatesChannel:e,minimumVersion:void 0})),k(`tengu_autoupdate_enabled`,{channel:e})}}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(f,{children:V?.type===`env`?`Auto-updates are controlled by an environment variable and cannot be changed here.`:`Auto-updates are disabled in development builds.`}),V?.type===`env`&&(0,Z.jsxs)(f,{dimColor:!0,children:[`Unset `,V.envVar,` to re-enable auto-updates.`]})]})}):L===`ChannelDowngrade`?(0,Z.jsx)(hn,{currentVersion:`2.8.0`,onChoice:e=>{if(R(null),i(!1),e===`cancel`)return;I.current=!0;let t={autoUpdatesChannel:`stable`};e===`stay`&&(t.minimumVersion=`2.8.0`),w(`userSettings`,t),x(e=>({...e,...t})),k(`tengu_autoupdate_channel_changed`,{channel:`stable`,minimum_version_set:e===`stay`})}}):(0,Z.jsxs)(g,{flexDirection:`column`,gap:1,marginY:se?void 0:1,children:[(0,Z.jsx)(re,{query:z,isFocused:O&&!d,isTerminalFocused:He,cursorOffset:wt,placeholder:`Search settings…`}),(0,Z.jsx)(g,{flexDirection:`column`,children:U.length===0?(0,Z.jsxs)(f,{dimColor:!0,italic:!0,children:[`No settings match "`,z,`"`]}):(0,Z.jsxs)(Z.Fragment,{children:[D>0&&(0,Z.jsxs)(f,{dimColor:!0,children:[s.arrowUp,` `,D,` more above`]}),U.slice(D,D+j).map((e,t)=>{let n=D+t===E&&!d&&!O;return(0,Z.jsx)(Y.Fragment,{children:(0,Z.jsxs)(g,{width:`100%`,children:[(0,Z.jsx)(g,{width:44,children:(0,Z.jsxs)(f,{color:n?`suggestion`:void 0,children:[n?s.pointer:` `,` `,e.label]})}),(0,Z.jsx)(g,{flexGrow:1,children:e.type===`boolean`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:e.value.toString()}),bt&&e.id===`thinkingEnabled`&&(0,Z.jsxs)(f,{color:`warning`,children:[` `,`Changing thinking mode mid-conversation will increase latency and may reduce quality.`]})]}):e.id===`theme`?(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:An[e.value.toString()]??e.value.toString()}):e.id===`notifChannel`?(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:(0,Z.jsx)(kn,{value:e.value.toString()})}):e.id===`defaultPermissionMode`?(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:he(e.value)}):e.id===`autoUpdatesChannel`&&V?(0,Z.jsxs)(g,{flexDirection:`column`,children:[(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:`disabled`}),(0,Z.jsxs)(f,{dimColor:!0,children:[`(`,Pe(V),`)`]})]}):(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:e.value.toString()})})]})},e.id)}),D+j<U.length&&(0,Z.jsxs)(f,{dimColor:!0,children:[s.arrowDown,` `,U.length-D-j,` more below`]})]})}),d?(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`←/→ tab`,action:`switch`}),(0,Z.jsx)(p,{shortcut:`↓`,action:`return`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`close`})]})}):O?(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(f,{children:`Type to filter`}),(0,Z.jsx)(p,{shortcut:`Enter/↓`,action:`select`}),(0,Z.jsx)(p,{shortcut:`↑`,action:`tabs`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`clear`})]})}):(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(N,{action:`select:accept`,context:`Settings`,fallback:`Space`,description:`change`}),(0,Z.jsx)(N,{action:`settings:close`,context:`Settings`,fallback:`Enter`,description:`save`}),(0,Z.jsx)(N,{action:`settings:search`,context:`Settings`,fallback:`/`,description:`search`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]})})}function On(e){return e===void 0?ye(nt()):e===null?`Default (leader's model)`:ye(e)}function kn({value:e}){switch(e){case`auto`:return`Auto`;case`iterm2`:return(0,Z.jsxs)(f,{children:[`iTerm2 `,(0,Z.jsx)(f,{dimColor:!0,children:`(OSC 9)`})]});case`terminal_bell`:return(0,Z.jsxs)(f,{children:[`Terminal Bell `,(0,Z.jsx)(f,{dimColor:!0,children:`(\\a)`})]});case`kitty`:return(0,Z.jsxs)(f,{children:[`Kitty `,(0,Z.jsx)(f,{dimColor:!0,children:`(OSC 99)`})]});case`ghostty`:return(0,Z.jsxs)(f,{children:[`Ghostty `,(0,Z.jsx)(f,{dimColor:!0,children:`(OSC 777)`})]});case`iterm2_with_bell`:return`iTerm2 w/ Bell`;case`notifications_disabled`:return`Disabled`;default:return e}}var Y,X,Z,An,jn=t((()=>{h(),Y=n(d(),1),X=n(d(),1),Ft(),o(),ze(),Ce(),u(),S(),jt(),Ue(),O(),Rt(),Ut(),R(),Gt(),x(),Jt(),Yt(),_n(),ot(),Cn(),En(),F(),Qe(),G(),Zt(),Ye(),T(),y(),bt(),i(),be(),Ne(),zt(),P(),$t(),H(),E(),Ze(),Ke(),Z=_(),An={auto:`Auto (match terminal)`,dark:`Dark mode`,light:`Light mode`,"dark-daltonized":`Dark mode (colorblind-friendly)`,"light-daltonized":`Light mode (colorblind-friendly)`,"dark-ansi":`Dark mode (ANSI colors only)`,"light-ansi":`Light mode (ANSI colors only)`}}));function Mn({title:e,limit:t,maxWidth:n,showTimeInReset:r=!0,extraSubtext:i}){let{utilization:a,resets_at:o}=t;if(a===null)return null;let s=`${Math.floor(a)}% used`,c;return o&&(c=`Resets ${j(o,!0,r)}`),i&&(c=c?`${i} · ${c}`:i),n>=62?(0,Q.jsxs)(g,{flexDirection:`column`,children:[(0,Q.jsx)(f,{bold:!0,children:e}),(0,Q.jsxs)(g,{flexDirection:`row`,gap:1,children:[(0,Q.jsx)(ie,{ratio:a/100,width:50,fillColor:`rate_limit_fill`,emptyColor:`rate_limit_empty`}),(0,Q.jsx)(f,{children:s})]}),c&&(0,Q.jsx)(f,{dimColor:!0,children:c})]}):(0,Q.jsxs)(g,{flexDirection:`column`,children:[(0,Q.jsxs)(f,{children:[(0,Q.jsx)(f,{bold:!0,children:e}),c&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(f,{children:` `}),(0,Q.jsxs)(f,{dimColor:!0,children:[`· `,c]})]})]}),(0,Q.jsx)(ie,{ratio:a/100,width:n,fillColor:`rate_limit_fill`,emptyColor:`rate_limit_empty`}),(0,Q.jsx)(f,{children:s})]})}function Nn(){let[e,t]=(0,In.useState)(null),[n,r]=(0,In.useState)(null),[i,a]=(0,In.useState)(!0),{columns:o}=ee(),s=o-2,c=Math.min(s,80),l=Fn.useCallback(async()=>{a(!0),r(null);try{t(await tn())}catch(e){We(e);let t=e,n=t.response?.data?Ve(t.response.data):void 0;r(n?`Failed to load usage data: ${n}`:`Failed to load usage data`)}finally{a(!1)}},[]);if((0,In.useEffect)(()=>{l()},[l]),de(`settings:retry`,()=>{l()},{context:`Settings`,isActive:!!n&&!i}),n)return(0,Q.jsxs)(g,{flexDirection:`column`,gap:1,children:[(0,Q.jsxs)(f,{color:`error`,children:[`Error: `,n]}),(0,Q.jsx)(f,{dimColor:!0,children:(0,Q.jsxs)(m,{children:[(0,Q.jsx)(N,{action:`settings:retry`,context:`Settings`,fallback:`r`,description:`retry`}),(0,Q.jsx)(N,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]});if(!e)return(0,Q.jsxs)(g,{flexDirection:`column`,gap:1,children:[(0,Q.jsx)(f,{dimColor:!0,children:`Loading usage data…`}),(0,Q.jsx)(f,{dimColor:!0,children:(0,Q.jsx)(N,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})})]});let u=Fe(),d=u===`max`||u===`team`||u===null,te=[{title:`Current session`,limit:e.five_hour},{title:`Current week (all models)`,limit:e.seven_day},...d?[{title:`Current week (Sonnet only)`,limit:e.seven_day_sonnet}]:[]];return(0,Q.jsxs)(g,{flexDirection:`column`,gap:1,width:`100%`,children:[te.some(({limit:e})=>e)||(0,Q.jsx)(f,{dimColor:!0,children:`/usage is only available for subscription plans.`}),te.map(({title:e,limit:t})=>t&&(0,Q.jsx)(Mn,{title:e,limit:t,maxWidth:c},e)),e.extra_usage&&(0,Q.jsx)(Pn,{extraUsage:e.extra_usage,maxWidth:c}),nn()&&(0,Q.jsx)(an,{maxWidth:c}),(0,Q.jsx)(f,{dimColor:!0,children:(0,Q.jsx)(N,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})})]})}function Pn({extraUsage:e,maxWidth:t}){let n=Fe();if(!(n===`pro`||n===`max`))return!1;if(!e.is_enabled)return z.isEnabled()?(0,Q.jsxs)(g,{flexDirection:`column`,children:[(0,Q.jsx)(f,{bold:!0,children:Ln}),(0,Q.jsx)(f,{dimColor:!0,children:`Extra usage not enabled · /extra-usage to enable`})]}):null;if(e.monthly_limit===null)return(0,Q.jsxs)(g,{flexDirection:`column`,children:[(0,Q.jsx)(f,{bold:!0,children:Ln}),(0,Q.jsx)(f,{dimColor:!0,children:`Unlimited`})]});if(typeof e.used_credits!=`number`||typeof e.utilization!=`number`)return null;let r=$e(e.used_credits/100,2),i=$e(e.monthly_limit/100,2),a=new Date,o=new Date(a.getFullYear(),a.getMonth()+1,1);return(0,Q.jsx)(Mn,{title:Ln,limit:{utilization:e.utilization,resets_at:o.toISOString()},showTimeInReset:!1,extraSubtext:`${r} / ${i} spent`,maxWidth:t})}var Fn,In,Q,Ln,Rn=t((()=>{Fn=n(d(),1),In=n(d(),1),At(),L(),Me(),H(),h(),Ft(),en(),M(),Ue(),D(),Qe(),rn(),Q=_(),Ln=`Extra usage`}));function zn({onClose:e,context:t,defaultTab:n}){let[r,i]=(0,Bn.useState)(n),[a,o]=(0,Bn.useState)(!1),[s,c]=(0,Bn.useState)(!1),l=Ht(),{rows:u}=W(ee()),d=l?u+1:Math.max(15,Math.min(Math.floor(u*.8),30)),[te]=(0,Bn.useState)(()=>cn().catch(()=>[]));return U(),de(`confirm:no`,()=>{a||e(`Status dialog dismissed`,{display:`system`})},{context:`Settings`,isActive:!a&&!(r===`Config`&&s)}),(0,$.jsx)(le,{color:`permission`,children:(0,$.jsx)(ue,{color:`permission`,selectedTab:r,onTabChange:i,hidden:a,initialHeaderFocused:n!==`Config`,contentHeight:a||l?void 0:d,children:[(0,$.jsx)(se,{title:`Status`,children:(0,$.jsx)(un,{context:t,diagnosticsPromise:te})},`status`),(0,$.jsx)(se,{title:`Config`,children:(0,$.jsx)(Bn.Suspense,{fallback:null,children:(0,$.jsx)(Dn,{context:t,onClose:e,setTabsHidden:o,onIsSearchModeChange:c,contentHeight:d})})},`config`),(0,$.jsx)(se,{title:`Usage`,children:(0,$.jsx)(Nn,{})},`usage`)]})})}var Bn,$,Vn=t((()=>{d(),Bn=n(d(),1),Ft(),It(),H(),G(),h(),mn(),jn(),Rn(),$=_()}));export{Vn as n,zn as t};
|
|
1
|
+
import{a as e,n as t,o as n}from"./chunk-DR8-3Aex.js";import{f as r,s as i,u as a}from"./envUtils-BWeoiL4Y.js";import{n as o,t as s}from"./figures-gfT9mM8P.js";import{E as c,F as ee,In as l,Ln as u,Rn as d,T as te,Ut as ne,_ as re,b as f,c as ie,f as ae,g as p,h as m,i as oe,n as se,nt as ce,p as le,r as ue,t as h,tt as de,x as g}from"./src-Di342QoJ.js";import{t as _}from"./jsx-runtime-D-D469L8.js";import{Ct as v,cn as y,kr as fe,tn as pe}from"./state-sIHsFpDu.js";import{As as me,Cc as b,Ds as he,Ka as ge,Lr as _e,Pr as x,Qa as ve,Rr as ye,S as be,Si as xe,Ss as S,Ts as Se,Xi as Ce,Zi as we,_ as Te,_c as Ee,cc as De,dc as C,di as Oe,it as ke,lc as Ae,li as je,lo as w,on as Me,oo as T,rt as Ne,sc as Pe,tn as Fe,ui as Ie,vi as E,ws as Le,xi as Re,yc as ze,yi as Be}from"./paths-BZjPDxMm.js";import{E as D,O as Ve}from"./debug-otxXY3j-.js";import{n as O,r as k}from"./analytics-DqMQntaB.js";import{n as A,t as He}from"./cwd--iizewsn.js";import{o as Ue,s as We}from"./log-DSV4Ht5l.js";import{i as Ge,o as Ke}from"./platform-mh9ypxS8.js";import{b as j,g as M}from"./startupProfiler-CBcN1Chw.js";import{r as qe}from"./permissions-BsVJvaEe.js";import{$b as Je,Ax as Ye,C as Xe,CS as Ze,DC as Qe,EC as N,Em as $e,Fr as et,Fx as tt,Gu as nt,I as rt,Jk as it,Ku as P,Qb as at,Qk as F,Ry as ot,TS as st,Xk as ct,Zb as lt,Zk as ut,aS as dt,ax as ft,br as pt,dC as mt,dS as ht,ds as gt,ex as _t,fC as vt,fS as I,fp as yt,fs as bt,ix as xt,km as L,kx as St,lC as R,l_ as z,nx as Ct,oS as wt,ox as Tt,pp as Et,rx as Dt,sx as Ot,tx as kt,uC as B,u_ as At,us as V,w as jt,y as Mt}from"./loadAgentsDir-BYWykYwn.js";import{r as Nt,t as Pt}from"./poorMode-CFRuV-nB.js";import{t as Ft}from"./useKeybinding-DPOUuymz.js";import{t as H}from"./useTerminalSize-Du-EamDN.js";import{n as U,t as It}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";import{i as Lt,r as Rt}from"./bridgeEnabled-DYclTb9d.js";import{a as zt,n as Bt,r as Vt}from"./teammateModeSnapshot-CLiiOCkO.js";import{i as W,n as G,r as Ht}from"./modalContext-CuTwi_eD.js";import{n as Ut,t as Wt}from"./ThemePicker-8X6yAwuQ.js";import{i as Gt,n as Kt,r as qt,t as Jt}from"./extraUsage-BMvDY0Sk.js";import{n as Yt,t as Xt}from"./ClaudeMdExternalIncludesDialog-DoNd72PS.js";import{t as Zt}from"./SearchBox-Bu4gYF0J.js";import{n as Qt,t as $t}from"./useSearchInput-BpMLsxaS.js";import{n as en,t as tn}from"./usage-Bw_LK9YI.js";import{a as nn,i as rn,t as an}from"./OverageCreditUpsell-B4beCEX2.js";function on(){let e=v();return[{label:`Version`,value:`2.8.1`},{label:`Session name`,value:pt(e)??(0,K.jsx)(f,{dimColor:!0,children:`/rename to add a name`})},{label:`Session ID`,value:e},{label:`cwd`,value:He()},...at(),...lt()]}function sn({mainLoopModel:e,mcp:t,theme:n,context:r}){return[{label:`Model`,value:Tt(e)},...Je(t.clients,r.options.ideInstallationStatus,n),...Ct(t.clients,n),...xt(),...ft()]}async function cn(){return[...await _t(),...await kt(),...await Dt()]}function ln({value:e}){return Array.isArray(e)?(0,K.jsx)(g,{flexWrap:`wrap`,columnGap:1,flexShrink:99,children:e.map((t,n)=>(0,K.jsxs)(f,{children:[t,n<e.length-1?`,`:``]},n))}):typeof e==`string`?(0,K.jsx)(f,{children:e}):e}function un({context:e,diagnosticsPromise:t}){let n=B(e=>e.mainLoopModel),r=B(e=>e.mcp),[i]=te(),a=fn.useMemo(()=>[on(),sn({mainLoopModel:n,mcp:r,theme:i,context:e})],[n,r,i,e]),o=Ht()?1:void 0;return(0,K.jsxs)(g,{flexDirection:`column`,flexGrow:o,children:[(0,K.jsxs)(g,{flexDirection:`column`,gap:1,flexGrow:o,children:[a.map((e,t)=>e.length>0&&(0,K.jsx)(g,{flexDirection:`column`,children:e.map(({label:e,value:t},n)=>(0,K.jsxs)(g,{flexDirection:`row`,gap:1,flexShrink:0,children:[e!==void 0&&(0,K.jsxs)(f,{bold:!0,children:[e,`:`]}),(0,K.jsx)(ln,{value:t})]},n))},t)),(0,K.jsx)(pn.Suspense,{fallback:null,children:(0,K.jsx)(dn,{promise:t})})]}),(0,K.jsx)(f,{dimColor:!0,children:(0,K.jsx)(N,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})})]})}function dn({promise:e}){let t=(0,pn.use)(e);return t.length===0?null:(0,K.jsxs)(g,{flexDirection:`column`,paddingBottom:1,children:[(0,K.jsx)(f,{bold:!0,children:`System Diagnostics`}),t.map((e,t)=>(0,K.jsxs)(g,{flexDirection:`row`,gap:1,paddingX:1,children:[(0,K.jsx)(f,{color:`error`,children:s.warning}),typeof e==`string`?(0,K.jsx)(f,{wrap:`wrap`,children:e}):e]},t))]})}var fn,pn,K,mn=t((()=>{o(),fn=n(d(),1),pn=n(d(),1),y(),G(),h(),R(),A(),et(),Ot(),Qe(),K=_()}));function hn({currentVersion:e,onChoice:t}){function n(e){t(e)}function r(){t(`cancel`)}return(0,gn.jsxs)(ae,{title:`Switch to Stable Channel`,onCancel:r,color:`permission`,hideBorder:!0,hideInputGuide:!0,children:[(0,gn.jsxs)(f,{children:[`The stable channel may have an older version than what you're currently running (`,e,`).`]}),(0,gn.jsx)(f,{dimColor:!0,children:`How would you like to handle this?`}),(0,gn.jsx)(dt,{options:[{label:`Allow possible downgrade to stable version`,value:`downgrade`},{label:`Stay on current version (${e}) until stable catches up`,value:`stay`}],onChange:n})]})}var gn,_n=t((()=>{d(),h(),ot(),gn=_()}));function vn(e){return Object.entries(e).map(([e,t])=>({label:t?.name??xn,value:e,description:t?.description??Sn}))}function yn({initialStyle:e,onComplete:t,onCancel:n,isStandaloneCommand:r}){let[i,a]=(0,bn.useState)([]),[o,s]=(0,bn.useState)(!0);(0,bn.useEffect)(()=>{gt(He()).then(e=>{a(vn(e)),s(!1)}).catch(()=>{a(vn(V)),s(!1)})},[]);let c=(0,bn.useCallback)(e=>{t(e)},[t]);return(0,q.jsx)(ae,{title:`Preferred output style`,onCancel:n,hideInputGuide:!r,hideBorder:!r,children:(0,q.jsxs)(g,{flexDirection:`column`,gap:1,children:[(0,q.jsx)(g,{marginTop:1,children:(0,q.jsx)(f,{dimColor:!0,children:`This changes how Claude Code communicates with you`})}),o?(0,q.jsx)(f,{dimColor:!0,children:`Loading output styles…`}):(0,q.jsx)(dt,{options:i,onChange:c,visibleOptionCount:10,defaultValue:e})]})})}var bn,q,xn,Sn,Cn=t((()=>{d(),bn=n(d(),1),bt(),h(),A(),wt(),q=_(),xn=`Default`,Sn=`Claude completes coding tasks efficiently and provides concise responses`}));function wn({initialLanguage:e,onComplete:t,onCancel:n}){let[r,i]=(0,Tn.useState)(e),[a,o]=(0,Tn.useState)((e??``).length);de(`confirm:no`,n,{context:`Settings`});function c(){let e=r?.trim();t(e||void 0)}return(0,J.jsxs)(g,{flexDirection:`column`,gap:1,children:[(0,J.jsx)(f,{children:`Enter your preferred response and voice language:`}),(0,J.jsxs)(g,{flexDirection:`row`,gap:1,children:[(0,J.jsx)(f,{children:s.pointer}),(0,J.jsx)(ht,{value:r??``,onChange:i,onSubmit:c,focus:!0,showCursor:!0,placeholder:`e.g., Japanese, 日本語, Español${s.ellipsis}`,columns:60,cursorOffset:a,onChangeCursorOffset:o})]}),(0,J.jsx)(f,{dimColor:!0,children:`Leave empty for default (English)`})]})}var Tn,J,En=t((()=>{o(),Tn=n(d(),1),h(),Ft(),I(),J=_()}));function Dn({onClose:t,context:n,setTabsHidden:i,onIsSearchModeChange:o,contentHeight:u}){let{headerFocused:d,focusHeader:ie}=oe(),se=Ht(),[,le]=te(),ue=c(),[h,_]=(0,X.useState)(C()),v=Y.useRef(C()),[y,x]=(0,X.useState)(ge()),be=Y.useRef(ge()),[S,Ce]=(0,X.useState)(y?.outputStyle||`default`),Me=Y.useRef(S),[T,Ne]=(0,X.useState)(y?.language),Fe=Y.useRef(T),[E,ze]=(0,X.useState)(0),[D,Ve]=(0,X.useState)(0),[O,A]=(0,X.useState)(!1),He=ne(),{rows:Ue}=ee(),Ke=u??Math.min(Math.floor(Ue*.8),30),j=Math.max(5,Ke-10),M=B(e=>e.mainLoopModel),Je=B(e=>e.verbose),Ye=B(e=>e.thinkingEnabled),Ze=B(e=>Re()?e.fastMode:!1),Qe=B(e=>e.promptSuggestionEnabled),$e=Se(y?.permissions?.defaultMode??`default`),et=Xe()||Mt()===`enabled`,nt=(Et(),e(yt)).isBriefEntitled(),P=vt(),[at,F]=(0,X.useState)({}),ot=Y.useRef(Ye),[lt]=(0,X.useState)(()=>ve(`localSettings`)),[ft]=(0,X.useState)(()=>ve(`userSettings`)),pt=Y.useRef(ue),ht=mt(),[gt]=(0,X.useState)(()=>{let e=ht.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}}),[_t]=(0,X.useState)(()=>pe()),I=Y.useRef(!1),[bt,xt]=(0,X.useState)(!1),[L,R]=(0,X.useState)(null),{query:z,setQuery:Ct,cursorOffset:wt}=Qt({isActive:O&&L===null&&!d,onExit:()=>A(!1),onExitUp:ie,passthroughCtrlKeys:[`c`,`d`]}),Tt=O&&!d;Y.useEffect(()=>{o?.(Tt)},[Tt,o]);let Dt=St(n.options.mcpClients),Ot=!a(process.env.CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING),kt=Y.use(ct(!0)),At=ut(kt),V=De();function jt(e){k(`tengu_config_model_changed`,{from_model:M,to_model:e}),P(t=>({...t,mainLoopModel:e,mainLoopModelForSession:null})),F(t=>{let n=ye(e)+(Kt(e,!1,_e())?` · Billed as extra usage`:``);if(`model`in t){let{model:e,...r}=t;return{...r,model:n}}return{...t,model:n}})}function Ft(e){b(t=>({...t,verbose:e})),_({...C(),verbose:e}),P(t=>({...t,verbose:e})),F(t=>{if(`verbose`in t){let{verbose:e,...n}=t;return n}return{...t,verbose:e}})}let H=[{id:`autoCompactEnabled`,label:`Auto-compact`,value:h.autoCompactEnabled,type:`boolean`,onChange(e){b(t=>({...t,autoCompactEnabled:e})),_({...C(),autoCompactEnabled:e}),k(`tengu_auto_compact_setting_changed`,{enabled:e})}},{id:`spinnerTipsEnabled`,label:`Show tips`,value:y?.spinnerTipsEnabled??!0,type:`boolean`,onChange(e){w(`localSettings`,{spinnerTipsEnabled:e}),x(t=>({...t,spinnerTipsEnabled:e})),k(`tengu_tips_setting_changed`,{enabled:e})}},{id:`cacheWarningEnabled`,label:`Cache warnings`,value:y?.cacheWarningEnabled??!0,type:`boolean`,onChange(e){w(`localSettings`,{cacheWarningEnabled:e}),x(t=>({...t,cacheWarningEnabled:e})),k(`tengu_cache_warning_setting_changed`,{enabled:e})}},{id:`prefersReducedMotion`,label:`Reduce motion`,value:y?.prefersReducedMotion??!1,type:`boolean`,onChange(e){w(`localSettings`,{prefersReducedMotion:e}),x(t=>({...t,prefersReducedMotion:e})),P(t=>({...t,settings:{...t.settings,prefersReducedMotion:e}})),k(`tengu_reduce_motion_setting_changed`,{enabled:e})}},{id:`thinkingEnabled`,label:`Thinking mode`,value:Ye??!0,type:`boolean`,onChange(e){P(t=>({...t,thinkingEnabled:e})),w(`userSettings`,{alwaysThinkingEnabled:e?void 0:!1}),k(`tengu_thinking_toggled`,{enabled:e})}},...Re()&&Be()?[{id:`fastMode`,label:`Fast mode (${je} only)`,value:!!Ze,type:`boolean`,onChange(e){Ie(),w(`userSettings`,{fastMode:e?!0:void 0}),e?(P(e=>({...e,mainLoopModel:Oe(),mainLoopModelForSession:null,fastMode:!0})),F(e=>({...e,model:Oe(),"Fast mode":`ON`}))):(P(e=>({...e,fastMode:!1})),F(e=>({...e,"Fast mode":`OFF`})))}}]:[],...Te(`tengu_chomp_inflection`,!1)?[{id:`promptSuggestionEnabled`,label:`Prompt suggestions`,value:Qe,type:`boolean`,onChange(e){P(t=>({...t,promptSuggestionEnabled:e})),w(`userSettings`,{promptSuggestionEnabled:e?void 0:!1})}}]:[],...[{id:`poorMode`,label:`Poor mode (save tokens)`,value:(Pt(),e(Nt)).isPoorModeActive(),type:`boolean`,onChange(t){(Pt(),e(Nt)).setPoorMode(t),P(e=>({...e,promptSuggestionEnabled:!t}))}}],...process.env.USER_TYPE===`ant`?[{id:`speculationEnabled`,label:`Speculative execution`,value:h.speculationEnabled??!0,type:`boolean`,onChange(e){b(t=>t.speculationEnabled===e?t:{...t,speculationEnabled:e}),_({...C(),speculationEnabled:e}),k(`tengu_speculation_setting_changed`,{enabled:e})}}]:[],...Ot?[{id:`fileCheckpointingEnabled`,label:`Rewind code (checkpoints)`,value:h.fileCheckpointingEnabled,type:`boolean`,onChange(e){b(t=>({...t,fileCheckpointingEnabled:e})),_({...C(),fileCheckpointingEnabled:e}),k(`tengu_file_history_snapshots_setting_changed`,{enabled:e})}}]:[],{id:`verbose`,label:`Verbose output`,value:Je,type:`boolean`,onChange:Ft},{id:`terminalProgressBarEnabled`,label:`Terminal progress bar`,value:h.terminalProgressBarEnabled,type:`boolean`,onChange(e){b(t=>({...t,terminalProgressBarEnabled:e})),_({...C(),terminalProgressBarEnabled:e}),k(`tengu_terminal_progress_bar_setting_changed`,{enabled:e})}},...Te(`tengu_terminal_sidebar`,!1)?[{id:`showStatusInTerminalTab`,label:`Show status in terminal tab`,value:h.showStatusInTerminalTab??!1,type:`boolean`,onChange(e){b(t=>({...t,showStatusInTerminalTab:e})),_({...C(),showStatusInTerminalTab:e}),k(`tengu_terminal_tab_status_setting_changed`,{enabled:e})}}]:[],{id:`showTurnDuration`,label:`Show turn duration`,value:h.showTurnDuration,type:`boolean`,onChange(e){b(t=>({...t,showTurnDuration:e})),_({...C(),showTurnDuration:e}),k(`tengu_show_turn_duration_setting_changed`,{enabled:e})}},{id:`defaultPermissionMode`,label:`Default permission mode`,value:$e,options:(()=>{let e=[`default`,`plan`];return[...e,...qe.filter(t=>!e.includes(t))]})(),type:`enum`,onChange(e){let t=Se(e),n=t===`auto`?t:Le(t)?me(t):t,r=w(`userSettings`,{permissions:{...y?.permissions,defaultMode:n}});if(r.error){We(r.error);return}x(e=>({...e,permissions:{...e?.permissions,defaultMode:n}})),F(t=>({...t,defaultPermissionMode:e})),k(`tengu_config_changed`,{setting:`defaultPermissionMode`,value:e})}},...et?[{id:`useAutoModeDuringPlan`,label:`Use auto mode during plan`,value:y?.useAutoModeDuringPlan??!0,type:`boolean`,onChange(e){w(`userSettings`,{useAutoModeDuringPlan:e}),x(t=>({...t,useAutoModeDuringPlan:e})),P(e=>{let t=rt(e.toolPermissionContext);return t===e.toolPermissionContext?e:{...e,toolPermissionContext:t}}),F(t=>({...t,"Use auto mode during plan":e}))}}]:[],{id:`respectGitignore`,label:`Respect .gitignore in file picker`,value:h.respectGitignore,type:`boolean`,onChange(e){b(t=>({...t,respectGitignore:e})),_({...C(),respectGitignore:e}),k(`tengu_respect_gitignore_setting_changed`,{enabled:e})}},{id:`copyFullResponse`,label:`Always copy full response (skip /copy picker)`,value:h.copyFullResponse,type:`boolean`,onChange(e){b(t=>({...t,copyFullResponse:e})),_({...C(),copyFullResponse:e}),k(`tengu_config_changed`,{setting:`copyFullResponse`,value:String(e)})}},...st()?[{id:`copyOnSelect`,label:`Copy on select`,value:h.copyOnSelect??!0,type:`boolean`,onChange(e){b(t=>({...t,copyOnSelect:e})),_({...C(),copyOnSelect:e}),k(`tengu_config_changed`,{setting:`copyOnSelect`,value:String(e)})}}]:[],V?{id:`autoUpdatesChannel`,label:`Auto-update channel`,value:`disabled`,type:`managedEnum`,onChange(){}}:{id:`autoUpdatesChannel`,label:`Auto-update channel`,value:y?.autoUpdatesChannel??`latest`,type:`managedEnum`,onChange(){}},{id:`theme`,label:`Theme`,value:ue,type:`managedEnum`,onChange:le},{id:`notifChannel`,label:`Local notifications`,value:h.preferredNotifChannel,options:[`auto`,`iterm2`,`terminal_bell`,`iterm2_with_bell`,`kitty`,`ghostty`,`notifications_disabled`],type:`enum`,onChange(e){b(t=>({...t,preferredNotifChannel:e})),_({...C(),preferredNotifChannel:e})}},...[{id:`taskCompleteNotifEnabled`,label:`Push when idle`,value:h.taskCompleteNotifEnabled??!1,type:`boolean`,onChange(e){b(t=>({...t,taskCompleteNotifEnabled:e})),_({...C(),taskCompleteNotifEnabled:e})}},{id:`inputNeededNotifEnabled`,label:`Push when input needed`,value:h.inputNeededNotifEnabled??!1,type:`boolean`,onChange(e){b(t=>({...t,inputNeededNotifEnabled:e})),_({...C(),inputNeededNotifEnabled:e})}},{id:`agentPushNotifEnabled`,label:`Push when Claude decides`,value:h.agentPushNotifEnabled??!1,type:`boolean`,onChange(e){b(t=>({...t,agentPushNotifEnabled:e})),_({...C(),agentPushNotifEnabled:e})}}],{id:`outputStyle`,label:`Output style`,value:S,type:`managedEnum`,onChange:()=>{}},...nt?[{id:`defaultView`,label:`What you see by default`,value:y?.defaultView===void 0?`default`:String(y.defaultView),options:[`transcript`,`chat`,`default`],type:`enum`,onChange(e){let t=e===`default`?void 0:e;w(`localSettings`,{defaultView:t}),x(e=>({...e,defaultView:t}));let n=t===`chat`;P(e=>e.isBriefOnly===n?e:{...e,isBriefOnly:n}),fe(n),F(t=>({...t,"Default view":e})),k(`tengu_default_view_setting_changed`,{value:t??`unset`})}}]:[],{id:`language`,label:`Language`,value:T??`Default (English)`,type:`managedEnum`,onChange:()=>{}},{id:`editorMode`,label:`Editor mode`,value:h.editorMode===`emacs`?`normal`:h.editorMode||`normal`,options:[`normal`,`vim`],type:`enum`,onChange(e){b(t=>({...t,editorMode:e})),_({...C(),editorMode:e}),k(`tengu_editor_mode_changed`,{mode:e,source:`config_panel`})}},{id:`prStatusFooterEnabled`,label:`Show PR status footer`,value:h.prStatusFooterEnabled??!0,type:`boolean`,onChange(e){b(t=>t.prStatusFooterEnabled===e?t:{...t,prStatusFooterEnabled:e}),_({...C(),prStatusFooterEnabled:e}),k(`tengu_pr_status_footer_setting_changed`,{enabled:e})}},{id:`model`,label:`Model`,value:M===null?`Default (recommended)`:M,type:`managedEnum`,onChange:jt},...Dt?[{id:`diffTool`,label:`Diff tool`,value:h.diffTool??`auto`,options:[`terminal`,`auto`],type:`enum`,onChange(e){b(t=>({...t,diffTool:e})),_({...C(),diffTool:e}),k(`tengu_diff_tool_changed`,{tool:e,source:`config_panel`})}}]:[],...tt()?[]:[{id:`autoConnectIde`,label:`Auto-connect to IDE (external terminal)`,value:h.autoConnectIde??!1,type:`boolean`,onChange(e){b(t=>({...t,autoConnectIde:e})),_({...C(),autoConnectIde:e}),k(`tengu_auto_connect_ide_changed`,{enabled:e,source:`config_panel`})}}],...tt()?[{id:`autoInstallIdeExtension`,label:`Auto-install IDE extension`,value:h.autoInstallIdeExtension??!0,type:`boolean`,onChange(e){b(t=>({...t,autoInstallIdeExtension:e})),_({...C(),autoInstallIdeExtension:e}),k(`tengu_auto_install_ide_extension_changed`,{enabled:e,source:`config_panel`})}}]:[],{id:`claudeInChromeDefaultEnabled`,label:`Claude in Chrome enabled by default`,value:h.claudeInChromeDefaultEnabled??!0,type:`boolean`,onChange(e){b(t=>({...t,claudeInChromeDefaultEnabled:e})),_({...C(),claudeInChromeDefaultEnabled:e}),k(`tengu_claude_in_chrome_setting_changed`,{enabled:e})}},...ke()?(()=>{let e=Vt(),t=e?`Teammate mode [overridden: ${e}]`:`Teammate mode`,n=Ge()===`windows`,r=n?[`auto`,`tmux`,`windows-terminal`,`in-process`]:[`auto`,`tmux`,`in-process`];return[{id:`teammateMode`,label:t,value:h.teammateMode??`auto`,options:r,type:`enum`,onChange(e){e!==`auto`&&e!==`tmux`&&e!==`windows-terminal`&&e!==`in-process`||e===`windows-terminal`&&!n||(Bt(e),b(t=>({...t,teammateMode:e})),_({...C(),teammateMode:e}),k(`tengu_teammate_mode_changed`,{mode:e}))}},{id:`teammateDefaultModel`,label:`Default teammate model`,value:On(h.teammateDefaultModel),type:`managedEnum`,onChange(){}}]})():[],...Lt()?[{id:`remoteControlAtStartup`,label:`Enable Remote Control for all sessions`,value:h.remoteControlAtStartup===void 0?`default`:String(h.remoteControlAtStartup),options:[`true`,`false`,`default`],type:`enum`,onChange(e){if(e===`default`)b(e=>{if(e.remoteControlAtStartup===void 0)return e;let t={...e};return delete t.remoteControlAtStartup,t}),_({...C(),remoteControlAtStartup:void 0});else{let t=e===`true`;b(e=>e.remoteControlAtStartup===t?e:{...e,remoteControlAtStartup:t}),_({...C(),remoteControlAtStartup:t})}let t=Ee();P(e=>e.replBridgeEnabled===t&&!e.replBridgeOutboundOnly?e:{...e,replBridgeEnabled:t,replBridgeOutboundOnly:!1})}}]:[],...At?[{id:`showExternalIncludesDialog`,label:`External CLAUDE.md includes`,value:Ae().hasClaudeMdExternalIncludesApproved?`true`:`false`,type:`managedEnum`,onChange(){}}]:[],...process.env.ANTHROPIC_API_KEY&&!r()?[{id:`apiKey`,label:(0,Z.jsxs)(f,{children:[`Use custom API key: `,(0,Z.jsx)(f,{bold:!0,children:we(process.env.ANTHROPIC_API_KEY)})]}),searchText:`Use custom API key`,value:!!(process.env.ANTHROPIC_API_KEY&&h.customApiKeyResponses?.approved?.includes(we(process.env.ANTHROPIC_API_KEY))),type:`boolean`,onChange(e){b(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=we(process.env.ANTHROPIC_API_KEY);e?n.customApiKeyResponses={...n.customApiKeyResponses,approved:[...(n.customApiKeyResponses.approved??[]).filter(e=>e!==t),t],rejected:(n.customApiKeyResponses.rejected??[]).filter(e=>e!==t)}:n.customApiKeyResponses={...n.customApiKeyResponses,approved:(n.customApiKeyResponses.approved??[]).filter(e=>e!==t),rejected:[...(n.customApiKeyResponses.rejected??[]).filter(e=>e!==t),t]}}return n}),_(C())}}]:[]],U=Y.useMemo(()=>{if(!z)return H;let e=z.toLowerCase();return H.filter(t=>t.id.toLowerCase().includes(e)?!0:(`searchText`in t?t.searchText:t.label).toLowerCase().includes(e))},[H,z]);Y.useEffect(()=>{if(E>=U.length){let e=Math.max(0,U.length-1);ze(e),Ve(Math.max(0,e-j+1));return}Ve(e=>E<e?E:E>=e+j?E-j+1:e)},[U.length,E,j]);let It=(0,X.useCallback)(e=>{Ve(t=>e<t?e:e>=t+j?e-j+1:t)},[j]),Rt=(0,X.useCallback)(()=>{if(L!==null)return;let e=Object.entries(at).map(([e,t])=>(k(`tengu_config_changed`,{key:e,value:t}),`Set ${e} to ${l.bold(t)}`)),n=r()?void 0:process.env.ANTHROPIC_API_KEY,i=!!(n&&v.current.customApiKeyResponses?.approved?.includes(we(n))),a=!!(n&&h.customApiKeyResponses?.approved?.includes(we(n)));if(i!==a&&(e.push(`${a?`Enabled`:`Disabled`} custom API key`),k(`tengu_config_changed`,{key:`env.ANTHROPIC_API_KEY`,value:a})),h.theme!==v.current.theme&&e.push(`Set theme to ${l.bold(h.theme)}`),h.preferredNotifChannel!==v.current.preferredNotifChannel&&e.push(`Set notifications to ${l.bold(h.preferredNotifChannel)}`),S!==Me.current&&e.push(`Set output style to ${l.bold(S)}`),T!==Fe.current&&e.push(`Set response language to ${l.bold(T??`Default (English)`)}`),h.editorMode!==v.current.editorMode&&e.push(`Set editor mode to ${l.bold(h.editorMode||`emacs`)}`),h.diffTool!==v.current.diffTool&&e.push(`Set diff tool to ${l.bold(h.diffTool)}`),h.autoConnectIde!==v.current.autoConnectIde&&e.push(`${h.autoConnectIde?`Enabled`:`Disabled`} auto-connect to IDE`),h.autoInstallIdeExtension!==v.current.autoInstallIdeExtension&&e.push(`${h.autoInstallIdeExtension?`Enabled`:`Disabled`} auto-install IDE extension`),h.autoCompactEnabled!==v.current.autoCompactEnabled&&e.push(`${h.autoCompactEnabled?`Enabled`:`Disabled`} auto-compact`),h.respectGitignore!==v.current.respectGitignore&&e.push(`${h.respectGitignore?`Enabled`:`Disabled`} respect .gitignore in file picker`),h.copyFullResponse!==v.current.copyFullResponse&&e.push(`${h.copyFullResponse?`Enabled`:`Disabled`} always copy full response`),h.copyOnSelect!==v.current.copyOnSelect&&e.push(`${h.copyOnSelect?`Enabled`:`Disabled`} copy on select`),h.terminalProgressBarEnabled!==v.current.terminalProgressBarEnabled&&e.push(`${h.terminalProgressBarEnabled?`Enabled`:`Disabled`} terminal progress bar`),h.showStatusInTerminalTab!==v.current.showStatusInTerminalTab&&e.push(`${h.showStatusInTerminalTab?`Enabled`:`Disabled`} terminal tab status`),h.showTurnDuration!==v.current.showTurnDuration&&e.push(`${h.showTurnDuration?`Enabled`:`Disabled`} turn duration`),h.remoteControlAtStartup!==v.current.remoteControlAtStartup){let t=h.remoteControlAtStartup===void 0?`Reset Remote Control to default`:`${h.remoteControlAtStartup?`Enabled`:`Disabled`} Remote Control for all sessions`;e.push(t)}y?.autoUpdatesChannel!==be.current?.autoUpdatesChannel&&e.push(`Set auto-update channel to ${l.bold(y?.autoUpdatesChannel??`latest`)}`),e.length>0?t(e.join(`
|
|
2
|
+
`)):t(`Config dialog dismissed`,{display:`system`})},[L,at,h,M,S,T,y?.autoUpdatesChannel,Re()?y?.fastMode:void 0,t]),zt=(0,X.useCallback)(()=>{ue!==pt.current&&le(pt.current),b(()=>v.current);let e=lt;w(`localSettings`,{spinnerTipsEnabled:e?.spinnerTipsEnabled,prefersReducedMotion:e?.prefersReducedMotion,defaultView:e?.defaultView,outputStyle:e?.outputStyle});let t=ft;w(`userSettings`,{alwaysThinkingEnabled:t?.alwaysThinkingEnabled,fastMode:t?.fastMode,promptSuggestionEnabled:t?.promptSuggestionEnabled,autoUpdatesChannel:t?.autoUpdatesChannel,minimumVersion:t?.minimumVersion,language:t?.language,useAutoModeDuringPlan:t?.useAutoModeDuringPlan,syntaxHighlightingDisabled:t?.syntaxHighlightingDisabled,permissions:t?.permissions===void 0?void 0:{...t.permissions,defaultMode:t.permissions.defaultMode}});let n=gt;P(e=>({...e,mainLoopModel:n.mainLoopModel,mainLoopModelForSession:n.mainLoopModelForSession,verbose:n.verbose,thinkingEnabled:n.thinkingEnabled,fastMode:n.fastMode,promptSuggestionEnabled:n.promptSuggestionEnabled,isBriefOnly:n.isBriefOnly,replBridgeEnabled:n.replBridgeEnabled,replBridgeOutboundOnly:n.replBridgeOutboundOnly,settings:n.settings,toolPermissionContext:rt(e.toolPermissionContext)})),pe()!==_t&&fe(_t)},[ue,le,lt,ft,gt,_t,P]);de(`confirm:no`,(0,X.useCallback)(()=>{L===null&&(I.current&&zt(),t(`Config dialog dismissed`,{display:`system`}))},[L,zt,t]),{context:`Settings`,isActive:L===null&&!O&&!d}),de(`settings:close`,Rt,{context:`Settings`,isActive:L===null&&!O&&!d});let W=(0,X.useCallback)(()=>{let e=U[E];if(!(!e||!e.onChange)){if(e.type===`boolean`){I.current=!0,e.onChange(!e.value),e.id===`thinkingEnabled`&&(!e.value===ot.current?xt(!1):n.messages.some(e=>e.type===`assistant`)&&xt(!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`:R(`Theme`),i(!0);return;case`model`:R(`Model`),i(!0);return;case`teammateDefaultModel`:R(`TeammateModel`),i(!0);return;case`showExternalIncludesDialog`:R(`ExternalIncludes`),i(!0);return;case`outputStyle`:R(`OutputStyle`),i(!0);return;case`language`:R(`Language`),i(!0);return}if(e.id===`autoUpdatesChannel`){if(V){R(`EnableAutoUpdates`),i(!0);return}(y?.autoUpdatesChannel??`latest`)===`latest`?(R(`ChannelDowngrade`),i(!0)):(I.current=!0,w(`userSettings`,{autoUpdatesChannel:`latest`,minimumVersion:void 0}),x(e=>({...e,autoUpdatesChannel:`latest`,minimumVersion:void 0})),k(`tengu_autoupdate_channel_changed`,{channel:`latest`}));return}if(e.type===`enum`){I.current=!0;let t=(e.options.indexOf(e.value)+1)%e.options.length;e.onChange(e.options[t]);return}}},[V,U,E,y?.autoUpdatesChannel,i]),G=e=>{xt(!1);let t=Math.max(0,Math.min(U.length-1,E+e));ze(t),It(t)};return ce({"select:previous":()=>{E===0?(xt(!1),A(!0),Ve(0)):G(-1)},"select:next":()=>G(1),"scroll:lineUp":()=>G(-1),"scroll:lineDown":()=>G(1),"select:accept":W,"select:previousValue":()=>W(),"select:nextValue":()=>W(),"settings:search":()=>{A(!0),Ct(``)}},{context:`Settings`,isActive:L===null&&!O&&!d}),(0,Z.jsx)(g,{flexDirection:`column`,width:`100%`,tabIndex:0,autoFocus:!0,onKeyDown:(0,X.useCallback)(e=>{if(L===null&&!d){if(O){if(e.key===`escape`){e.preventDefault(),z.length>0?Ct(``):A(!1);return}(e.key===`return`||e.key===`down`||e.key===`wheeldown`)&&(e.preventDefault(),A(!1),ze(0),Ve(0));return}if(e.key===`left`||e.key===`right`||e.key===`tab`){e.preventDefault(),W();return}e.ctrl||e.meta||e.key===`j`||e.key===`k`||e.key===`/`||e.key.length===1&&e.key!==` `&&(e.preventDefault(),A(!0),Ct(e.key))}},[L,d,O,z,Ct,W]),children:L===`Theme`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Wt,{onThemeSelect:e=>{I.current=!0,le(e),R(null),i(!1)},onCancel:()=>{R(null),i(!1)},hideEscToCancel:!0,skipExitHandling:!0}),(0,Z.jsx)(g,{children:(0,Z.jsx)(f,{dimColor:!0,italic:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`Enter`,action:`select`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]}):L===`Model`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(qt,{initial:M,onSelect:(e,t)=>{I.current=!0,jt(e),R(null),i(!1)},onCancel:()=>{R(null),i(!1)},showFastModeNotice:Re()?Ze&&xe(M)&&Be():!1}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]}):L===`TeammateModel`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(qt,{initial:h.teammateDefaultModel??null,skipSettingsWrite:!0,headerText:`Default model for newly spawned teammates. The leader can override via the tool call's model parameter.`,onSelect:(e,t)=>{R(null),i(!1),!(h.teammateDefaultModel===void 0&&e===null)&&(I.current=!0,b(t=>t.teammateDefaultModel===e?t:{...t,teammateDefaultModel:e}),_({...C(),teammateDefaultModel:e}),F(t=>({...t,teammateDefaultModel:On(e)})),k(`tengu_teammate_default_model_changed`,{model:e}))},onCancel:()=>{R(null),i(!1)}}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]}):L===`ExternalIncludes`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Xt,{onDone:()=>{R(null),i(!1)},externalIncludes:it(kt)}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`disable external includes`})]})})]}):L===`OutputStyle`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(yn,{initialStyle:S,onComplete:e=>{I.current=!0,Ce(e??`default`),R(null),i(!1),w(`localSettings`,{outputStyle:e}),k(`tengu_output_style_changed`,{style:e??`default`,source:`config_panel`,settings_source:`localSettings`})},onCancel:()=>{R(null),i(!1)}}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]}):L===`Language`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(wn,{initialLanguage:T,onComplete:e=>{I.current=!0,Ne(e),R(null),i(!1),w(`userSettings`,{language:e}),k(`tengu_language_changed`,{language:e??`default`,source:`config_panel`})},onCancel:()=>{R(null),i(!1)}}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]}):L===`EnableAutoUpdates`?(0,Z.jsx)(ae,{title:`Enable Auto-Updates`,onCancel:()=>{R(null),i(!1)},hideBorder:!0,hideInputGuide:!0,children:V?.type===`config`?(0,Z.jsx)(dt,{options:[{label:`Enable with latest channel`,value:`latest`},{label:`Enable with stable channel`,value:`stable`}],onChange:e=>{I.current=!0,R(null),i(!1),b(e=>({...e,autoUpdates:!0})),_({...C(),autoUpdates:!0}),w(`userSettings`,{autoUpdatesChannel:e,minimumVersion:void 0}),x(t=>({...t,autoUpdatesChannel:e,minimumVersion:void 0})),k(`tengu_autoupdate_enabled`,{channel:e})}}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(f,{children:V?.type===`env`?`Auto-updates are controlled by an environment variable and cannot be changed here.`:`Auto-updates are disabled in development builds.`}),V?.type===`env`&&(0,Z.jsxs)(f,{dimColor:!0,children:[`Unset `,V.envVar,` to re-enable auto-updates.`]})]})}):L===`ChannelDowngrade`?(0,Z.jsx)(hn,{currentVersion:`2.8.1`,onChoice:e=>{if(R(null),i(!1),e===`cancel`)return;I.current=!0;let t={autoUpdatesChannel:`stable`};e===`stay`&&(t.minimumVersion=`2.8.1`),w(`userSettings`,t),x(e=>({...e,...t})),k(`tengu_autoupdate_channel_changed`,{channel:`stable`,minimum_version_set:e===`stay`})}}):(0,Z.jsxs)(g,{flexDirection:`column`,gap:1,marginY:se?void 0:1,children:[(0,Z.jsx)(re,{query:z,isFocused:O&&!d,isTerminalFocused:He,cursorOffset:wt,placeholder:`Search settings…`}),(0,Z.jsx)(g,{flexDirection:`column`,children:U.length===0?(0,Z.jsxs)(f,{dimColor:!0,italic:!0,children:[`No settings match "`,z,`"`]}):(0,Z.jsxs)(Z.Fragment,{children:[D>0&&(0,Z.jsxs)(f,{dimColor:!0,children:[s.arrowUp,` `,D,` more above`]}),U.slice(D,D+j).map((e,t)=>{let n=D+t===E&&!d&&!O;return(0,Z.jsx)(Y.Fragment,{children:(0,Z.jsxs)(g,{width:`100%`,children:[(0,Z.jsx)(g,{width:44,children:(0,Z.jsxs)(f,{color:n?`suggestion`:void 0,children:[n?s.pointer:` `,` `,e.label]})}),(0,Z.jsx)(g,{flexGrow:1,children:e.type===`boolean`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:e.value.toString()}),bt&&e.id===`thinkingEnabled`&&(0,Z.jsxs)(f,{color:`warning`,children:[` `,`Changing thinking mode mid-conversation will increase latency and may reduce quality.`]})]}):e.id===`theme`?(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:An[e.value.toString()]??e.value.toString()}):e.id===`notifChannel`?(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:(0,Z.jsx)(kn,{value:e.value.toString()})}):e.id===`defaultPermissionMode`?(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:he(e.value)}):e.id===`autoUpdatesChannel`&&V?(0,Z.jsxs)(g,{flexDirection:`column`,children:[(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:`disabled`}),(0,Z.jsxs)(f,{dimColor:!0,children:[`(`,Pe(V),`)`]})]}):(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:e.value.toString()})})]})},e.id)}),D+j<U.length&&(0,Z.jsxs)(f,{dimColor:!0,children:[s.arrowDown,` `,U.length-D-j,` more below`]})]})}),d?(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`←/→ tab`,action:`switch`}),(0,Z.jsx)(p,{shortcut:`↓`,action:`return`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`close`})]})}):O?(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(f,{children:`Type to filter`}),(0,Z.jsx)(p,{shortcut:`Enter/↓`,action:`select`}),(0,Z.jsx)(p,{shortcut:`↑`,action:`tabs`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`clear`})]})}):(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(N,{action:`select:accept`,context:`Settings`,fallback:`Space`,description:`change`}),(0,Z.jsx)(N,{action:`settings:close`,context:`Settings`,fallback:`Enter`,description:`save`}),(0,Z.jsx)(N,{action:`settings:search`,context:`Settings`,fallback:`/`,description:`search`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]})})}function On(e){return e===void 0?ye(nt()):e===null?`Default (leader's model)`:ye(e)}function kn({value:e}){switch(e){case`auto`:return`Auto`;case`iterm2`:return(0,Z.jsxs)(f,{children:[`iTerm2 `,(0,Z.jsx)(f,{dimColor:!0,children:`(OSC 9)`})]});case`terminal_bell`:return(0,Z.jsxs)(f,{children:[`Terminal Bell `,(0,Z.jsx)(f,{dimColor:!0,children:`(\\a)`})]});case`kitty`:return(0,Z.jsxs)(f,{children:[`Kitty `,(0,Z.jsx)(f,{dimColor:!0,children:`(OSC 99)`})]});case`ghostty`:return(0,Z.jsxs)(f,{children:[`Ghostty `,(0,Z.jsx)(f,{dimColor:!0,children:`(OSC 777)`})]});case`iterm2_with_bell`:return`iTerm2 w/ Bell`;case`notifications_disabled`:return`Disabled`;default:return e}}var Y,X,Z,An,jn=t((()=>{h(),Y=n(d(),1),X=n(d(),1),Ft(),o(),ze(),Ce(),u(),S(),jt(),Ue(),O(),Rt(),Ut(),R(),Gt(),x(),Jt(),Yt(),_n(),ot(),Cn(),En(),F(),Qe(),G(),Zt(),Ye(),T(),y(),bt(),i(),be(),Ne(),zt(),P(),$t(),H(),E(),Ze(),Ke(),Z=_(),An={auto:`Auto (match terminal)`,dark:`Dark mode`,light:`Light mode`,"dark-daltonized":`Dark mode (colorblind-friendly)`,"light-daltonized":`Light mode (colorblind-friendly)`,"dark-ansi":`Dark mode (ANSI colors only)`,"light-ansi":`Light mode (ANSI colors only)`}}));function Mn({title:e,limit:t,maxWidth:n,showTimeInReset:r=!0,extraSubtext:i}){let{utilization:a,resets_at:o}=t;if(a===null)return null;let s=`${Math.floor(a)}% used`,c;return o&&(c=`Resets ${M(o,!0,r)}`),i&&(c=c?`${i} · ${c}`:i),n>=62?(0,Q.jsxs)(g,{flexDirection:`column`,children:[(0,Q.jsx)(f,{bold:!0,children:e}),(0,Q.jsxs)(g,{flexDirection:`row`,gap:1,children:[(0,Q.jsx)(ie,{ratio:a/100,width:50,fillColor:`rate_limit_fill`,emptyColor:`rate_limit_empty`}),(0,Q.jsx)(f,{children:s})]}),c&&(0,Q.jsx)(f,{dimColor:!0,children:c})]}):(0,Q.jsxs)(g,{flexDirection:`column`,children:[(0,Q.jsxs)(f,{children:[(0,Q.jsx)(f,{bold:!0,children:e}),c&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(f,{children:` `}),(0,Q.jsxs)(f,{dimColor:!0,children:[`· `,c]})]})]}),(0,Q.jsx)(ie,{ratio:a/100,width:n,fillColor:`rate_limit_fill`,emptyColor:`rate_limit_empty`}),(0,Q.jsx)(f,{children:s})]})}function Nn(){let[e,t]=(0,In.useState)(null),[n,r]=(0,In.useState)(null),[i,a]=(0,In.useState)(!0),{columns:o}=ee(),s=o-2,c=Math.min(s,80),l=Fn.useCallback(async()=>{a(!0),r(null);try{t(await tn())}catch(e){We(e);let t=e,n=t.response?.data?Ve(t.response.data):void 0;r(n?`Failed to load usage data: ${n}`:`Failed to load usage data`)}finally{a(!1)}},[]);if((0,In.useEffect)(()=>{l()},[l]),de(`settings:retry`,()=>{l()},{context:`Settings`,isActive:!!n&&!i}),n)return(0,Q.jsxs)(g,{flexDirection:`column`,gap:1,children:[(0,Q.jsxs)(f,{color:`error`,children:[`Error: `,n]}),(0,Q.jsx)(f,{dimColor:!0,children:(0,Q.jsxs)(m,{children:[(0,Q.jsx)(N,{action:`settings:retry`,context:`Settings`,fallback:`r`,description:`retry`}),(0,Q.jsx)(N,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]});if(!e)return(0,Q.jsxs)(g,{flexDirection:`column`,gap:1,children:[(0,Q.jsx)(f,{dimColor:!0,children:`Loading usage data…`}),(0,Q.jsx)(f,{dimColor:!0,children:(0,Q.jsx)(N,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})})]});let u=Fe(),d=u===`max`||u===`team`||u===null,te=[{title:`Current session`,limit:e.five_hour},{title:`Current week (all models)`,limit:e.seven_day},...d?[{title:`Current week (Sonnet only)`,limit:e.seven_day_sonnet}]:[]];return(0,Q.jsxs)(g,{flexDirection:`column`,gap:1,width:`100%`,children:[te.some(({limit:e})=>e)||(0,Q.jsx)(f,{dimColor:!0,children:`/usage is only available for subscription plans.`}),te.map(({title:e,limit:t})=>t&&(0,Q.jsx)(Mn,{title:e,limit:t,maxWidth:c},e)),e.extra_usage&&(0,Q.jsx)(Pn,{extraUsage:e.extra_usage,maxWidth:c}),nn()&&(0,Q.jsx)(an,{maxWidth:c}),(0,Q.jsx)(f,{dimColor:!0,children:(0,Q.jsx)(N,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})})]})}function Pn({extraUsage:e,maxWidth:t}){let n=Fe();if(!(n===`pro`||n===`max`))return!1;if(!e.is_enabled)return z.isEnabled()?(0,Q.jsxs)(g,{flexDirection:`column`,children:[(0,Q.jsx)(f,{bold:!0,children:Ln}),(0,Q.jsx)(f,{dimColor:!0,children:`Extra usage not enabled · /extra-usage to enable`})]}):null;if(e.monthly_limit===null)return(0,Q.jsxs)(g,{flexDirection:`column`,children:[(0,Q.jsx)(f,{bold:!0,children:Ln}),(0,Q.jsx)(f,{dimColor:!0,children:`Unlimited`})]});if(typeof e.used_credits!=`number`||typeof e.utilization!=`number`)return null;let r=$e(e.used_credits/100,2),i=$e(e.monthly_limit/100,2),a=new Date,o=new Date(a.getFullYear(),a.getMonth()+1,1);return(0,Q.jsx)(Mn,{title:Ln,limit:{utilization:e.utilization,resets_at:o.toISOString()},showTimeInReset:!1,extraSubtext:`${r} / ${i} spent`,maxWidth:t})}var Fn,In,Q,Ln,Rn=t((()=>{Fn=n(d(),1),In=n(d(),1),At(),L(),Me(),H(),h(),Ft(),en(),j(),Ue(),D(),Qe(),rn(),Q=_(),Ln=`Extra usage`}));function zn({onClose:e,context:t,defaultTab:n}){let[r,i]=(0,Bn.useState)(n),[a,o]=(0,Bn.useState)(!1),[s,c]=(0,Bn.useState)(!1),l=Ht(),{rows:u}=W(ee()),d=l?u+1:Math.max(15,Math.min(Math.floor(u*.8),30)),[te]=(0,Bn.useState)(()=>cn().catch(()=>[]));return U(),de(`confirm:no`,()=>{a||e(`Status dialog dismissed`,{display:`system`})},{context:`Settings`,isActive:!a&&!(r===`Config`&&s)}),(0,$.jsx)(le,{color:`permission`,children:(0,$.jsx)(ue,{color:`permission`,selectedTab:r,onTabChange:i,hidden:a,initialHeaderFocused:n!==`Config`,contentHeight:a||l?void 0:d,children:[(0,$.jsx)(se,{title:`Status`,children:(0,$.jsx)(un,{context:t,diagnosticsPromise:te})},`status`),(0,$.jsx)(se,{title:`Config`,children:(0,$.jsx)(Bn.Suspense,{fallback:null,children:(0,$.jsx)(Dn,{context:t,onClose:e,setTabsHidden:o,onIsSearchModeChange:c,contentHeight:d})})},`config`),(0,$.jsx)(se,{title:`Usage`,children:(0,$.jsx)(Nn,{})},`usage`)]})})}var Bn,$,Vn=t((()=>{d(),Bn=n(d(),1),Ft(),It(),H(),G(),h(),mn(),jn(),Rn(),$=_()}));export{Vn as n,zn as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./figures-gfT9mM8P.js";import{B as r,Rn as i,b as a,t as o,x as s}from"./src-
|
|
1
|
+
import{o as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./figures-gfT9mM8P.js";import{B as r,Rn as i,b as a,t as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{Fv as l,Lv as u,Mv as d,Nv as f,cC as p,lC as m}from"./loadAgentsDir-BYWykYwn.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)(p,{children:(0,g.jsx)(r,{})}));let i=await u(t,n);n(`checking_out`);let{branchName:a,branchError:o}=await d(i.branch);return{messages:l(i.log,o),branchName:a}}export{b as teleportWithProgress};
|
|
@@ -1 +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-
|
|
1
|
+
import{o as e}from"./chunk-DR8-3Aex.js";import{Rn as t,b as n,f as r,t as i,x as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{Bc as s,Uc as c}from"./paths-BZjPDxMm.js";import{Ky as l,Ry as u,Wy as d,aS as f}from"./loadAgentsDir-BYWykYwn.js";import{a as p,r as m}from"./githubRepoPathMapping-5IlVgR2l.js";var h=e(t(),1);i(),c(),u(),l();var g=o();function _({targetRepo:e,initialPaths:t,onSelectPath:i,onCancel:o}){let[c,l]=(0,h.useState)(t),[u,_]=(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(c.filter(e=>e!==t)),y(!1),_(`${s(t)} no longer contains the correct repository. Select another path.`)},[e,c,i,o]),x=[...c.map(e=>({label:(0,g.jsxs)(n,{children:[`Use `,(0,g.jsx)(n,{bold:!0,children:s(e)})]}),value:e})),{label:`Cancel`,value:`cancel`}];return(0,g.jsx)(r,{title:`Teleport to Repo`,onCancel:o,color:`background`,children:c.length>0?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(a,{flexDirection:`column`,gap:1,children:[u&&(0,g.jsx)(n,{color:`error`,children:u}),(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)(d,{}),(0,g.jsx)(n,{children:` Validating repository…`})]}):(0,g.jsx)(f,{options:x,onChange:e=>void b(e)})]}):(0,g.jsxs)(a,{flexDirection:`column`,gap:1,children:[u&&(0,g.jsx)(n,{color:`error`,children:u}),(0,g.jsxs)(n,{dimColor:!0,children:[`Run claude --teleport from a checkout of `,e]})]})})}export{_ as TeleportRepoMismatchDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-DR8-3Aex.js";import{F as t,Rn as n,b as r,g as i,h as a,t as o,tt as s,x as c,xt as l}from"./src-
|
|
1
|
+
import{o as e}from"./chunk-DR8-3Aex.js";import{F as t,Rn as n,b as r,g as i,h as a,t as o,tt as s,x as c,xt as l}from"./src-Di342QoJ.js";import{t as u}from"./jsx-runtime-D-D469L8.js";import{Er as d,cn as f}from"./state-sIHsFpDu.js";import{L as p,U as m,l as h,p as g,z as _}from"./debug-otxXY3j-.js";import{n as v,r as y}from"./analytics-DqMQntaB.js";import{b,m as x}from"./startupProfiler-CBcN1Chw.js";import{DC as S,DT as C,EC as w,Iy as T,Ky as E,Lv as D,Ly as O,Nv as k,OT as A,Ry as j,Wy as M,aS as N}from"./loadAgentsDir-BYWykYwn.js";import{a as P,n as F}from"./detectRepository-2ICvGD0U.js";import{n as I,o as L}from"./api-hcsOinLV.js";import{t as R}from"./useKeybinding-DPOUuymz.js";import{t as z}from"./useTerminalSize-Du-EamDN.js";var B=e(n(),1);f(),v(),m(),k();function V(e){let[t,n]=(0,B.useState)(!1),[r,i]=(0,B.useState)(null),[a,o]=(0,B.useState)(null);return{resumeSession:(0,B.useCallback)(async t=>{n(!0),i(null),o(t),y(`tengu_teleport_resume_session`,{source:e,session_id:t.id});try{let e=await D(t.id);return d({sessionId:t.id}),n(!1),e}catch(e){return i({message:e instanceof p?e.message:_(e),formattedMessage:e instanceof p?e.formattedMessage:void 0,isOperationError:e instanceof p}),n(!1),null}},[e]),isResuming:t,error:r,selectedSession:a,clearError:(0,B.useCallback)(()=>{i(null)},[])}}z(),L(),o(),R(),C(),h(),P(),b(),S(),j(),E(),O();var H=u(),U=`Updated`,W=` `;function G({onSelect:e,onCancel:n,isEmbedded:o=!1}){let{rows:u}=t(),[d,f]=(0,B.useState)([]),[p,m]=(0,B.useState)(null),[h,_]=(0,B.useState)(!0),[v,y]=(0,B.useState)(null),[b,S]=(0,B.useState)(!1),[C,E]=(0,B.useState)(!1),[D,O]=(0,B.useState)(1),k=A(`confirm:no`,`Confirmation`,`Esc`),j=(0,B.useCallback)(async()=>{try{_(!0),y(null);let e=await F();m(e),g(`Current repository: ${e||`not detected`}`);let t=await I(),n=t;e&&(n=t.filter(t=>t.repo?`${t.repo.owner.login}/${t.repo.name}`===e:!1),g(`Filtered ${n.length} sessions for repo ${e} from ${t.length} total`)),f([...n].sort((e,t)=>{let n=new Date(e.updated_at);return new Date(t.updated_at).getTime()-n.getTime()}))}catch(e){let t=e instanceof Error?e.message:String(e);g(`Error loading code sessions: ${t}`),y(K(t))}finally{_(!1),S(!1)}},[]),P=()=>{S(!0),j()};s(`confirm:no`,n,{context:`Confirmation`}),l((e,t)=>{if(t.ctrl&&e===`c`){n();return}if(t.ctrl&&e===`r`&&v){P();return}if(v!==null&&t.return){n();return}});let L=(0,B.useCallback)(()=>{E(!0),j()},[E,j]);if(!C)return(0,H.jsx)(T,{onComplete:L});if(h)return(0,H.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,H.jsxs)(c,{flexDirection:`row`,children:[(0,H.jsx)(M,{}),(0,H.jsx)(r,{bold:!0,children:`Loading Claude Code sessions…`})]}),(0,H.jsx)(r,{dimColor:!0,children:b?`Retrying…`:`Fetching your Claude Code sessions…`})]});if(v)return(0,H.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,H.jsx)(r,{bold:!0,color:`error`,children:`Error loading Claude Code sessions`}),q(v),(0,H.jsxs)(r,{dimColor:!0,children:[`Press `,(0,H.jsx)(r,{bold:!0,children:`Ctrl+R`}),` to retry · Press `,(0,H.jsx)(r,{bold:!0,children:k}),` to cancel`]})]});if(d.length===0)return(0,H.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,H.jsxs)(r,{bold:!0,children:[`No Claude Code sessions found`,p&&(0,H.jsxs)(r,{children:[` for `,p]})]}),(0,H.jsx)(c,{marginTop:1,children:(0,H.jsxs)(r,{dimColor:!0,children:[`Press `,(0,H.jsx)(r,{bold:!0,children:k}),` to cancel`]})})]});let R=d.map(e=>({...e,timeString:x(new Date(e.updated_at))})),z=Math.max(7,...R.map(e=>e.timeString.length)),V=R.map(({timeString:e,title:t,id:n})=>({label:`${e.padEnd(z,` `)} ${t}`,value:n})),G=Math.max(1,o?Math.min(d.length,5,u-6-7):Math.min(d.length,u-1-7));return(0,H.jsxs)(c,{flexDirection:`column`,padding:1,height:G+7,children:[(0,H.jsxs)(r,{bold:!0,children:[`Select a session to resume`,d.length>G&&(0,H.jsxs)(r,{dimColor:!0,children:[` `,`(`,D,` of `,d.length,`)`]}),p&&(0,H.jsxs)(r,{dimColor:!0,children:[` (`,p,`)`]}),`:`]}),(0,H.jsxs)(c,{flexDirection:`column`,marginTop:1,flexGrow:1,children:[(0,H.jsx)(c,{marginLeft:2,children:(0,H.jsxs)(r,{bold:!0,children:[U.padEnd(z,` `),W,`Session Title`]})}),(0,H.jsx)(N,{visibleOptionCount:G,options:V,onChange:t=>{let n=d.find(e=>e.id===t);n&&e(n)},onFocus:e=>{let t=V.findIndex(t=>t.value===e);t>=0&&O(t+1)}})]}),(0,H.jsx)(c,{flexDirection:`row`,children:(0,H.jsx)(r,{dimColor:!0,children:(0,H.jsxs)(a,{children:[(0,H.jsx)(i,{shortcut:`↑/↓`,action:`select`}),(0,H.jsx)(i,{shortcut:`Enter`,action:`confirm`}),(0,H.jsx)(w,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}function K(e){let t=e.toLowerCase();return t.includes(`fetch`)||t.includes(`network`)||t.includes(`timeout`)?`network`:t.includes(`auth`)||t.includes(`token`)||t.includes(`permission`)||t.includes(`oauth`)||t.includes(`not authenticated`)||t.includes(`/login`)||t.includes(`console account`)||t.includes(`403`)?`auth`:t.includes(`api`)||t.includes(`rate limit`)||t.includes(`500`)||t.includes(`529`)?`api`:`other`}function q(e){switch(e){case`network`:return(0,H.jsx)(c,{marginY:1,flexDirection:`column`,children:(0,H.jsx)(r,{dimColor:!0,children:`Check your internet connection`})});case`auth`:return(0,H.jsxs)(c,{marginY:1,flexDirection:`column`,children:[(0,H.jsx)(r,{dimColor:!0,children:`Teleport requires a Claude account`}),(0,H.jsxs)(r,{dimColor:!0,children:[`Run `,(0,H.jsx)(r,{bold:!0,children:`/login`}),` and select "Claude account with subscription"`]})]});case`api`:return(0,H.jsx)(c,{marginY:1,flexDirection:`column`,children:(0,H.jsx)(r,{dimColor:!0,children:`Sorry, Claude encountered an error`})});case`other`:return(0,H.jsx)(c,{marginY:1,flexDirection:`row`,children:(0,H.jsx)(r,{dimColor:!0,children:`Sorry, Claude Code encountered an error`})})}}v(),o(),R(),E();function J({onComplete:e,onCancel:t,onError:n,isEmbedded:i=!1,source:a}){let{resumeSession:o,isResuming:l,error:u,selectedSession:d}=V(a);(0,B.useEffect)(()=>{y(`tengu_teleport_started`,{source:a})},[a]);let f=async t=>{let r=await o(t);r?e(r):u&&n&&n(u.message,u.formattedMessage)},p=()=>{y(`tengu_teleport_cancelled`,{}),t()};return s(`app:interrupt`,p,{context:`Global`,isActive:!!u&&!n}),l&&d?(0,H.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,H.jsxs)(c,{flexDirection:`row`,children:[(0,H.jsx)(M,{}),(0,H.jsx)(r,{bold:!0,children:`Resuming session…`})]}),(0,H.jsxs)(r,{dimColor:!0,children:[`Loading "`,d.title,`"…`]})]}):u&&!n?(0,H.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,H.jsx)(r,{bold:!0,color:`error`,children:`Failed to resume session`}),(0,H.jsx)(r,{dimColor:!0,children:u.message}),(0,H.jsx)(c,{marginTop:1,children:(0,H.jsxs)(r,{dimColor:!0,children:[`Press `,(0,H.jsx)(r,{bold:!0,children:`Esc`}),` to cancel`]})})]}):(0,H.jsx)(G,{onSelect:f,onCancel:p,isEmbedded:i})}export{J as TeleportResumeWrapper};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{E as t,F as n,Rn as r,T as i,b as a,g as o,h as s,ot as c,t as l,tt as u,w as d,x as f}from"./src-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{E as t,F as n,Rn as r,T as i,b as a,g as o,h as s,ot as c,t as l,tt as u,w as d,x as f}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{lo as m,oo as h}from"./paths-BZjPDxMm.js";import{DT as g,OT as _,Ry as v,SE as y,_m as b,aS as x,dm as S,fC as C,fm as w,gm as T,hm as E,kT as D,lC as O,uC as k,wE as A}from"./loadAgentsDir-BYWykYwn.js";import{t as j}from"./useKeybinding-DPOUuymz.js";import{t as M}from"./useTerminalSize-Du-EamDN.js";import{n as N,t as P}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";function F({onThemeSelect:e,showIntroText:r=!1,helpText:l=``,showHelpTextBelow:p=!1,hideEscToCancel:h=!1,skipExitHandling:g=!1,onCancel:v}){let[b]=i(),w=t(),{columns:D}=n(),O=E(),A=O===null?T(b):null,{setPreviewTheme:j,savePreview:M,cancelPreview:P}=d(),F=k(e=>e.settings.syntaxHighlightingDisabled)??!1,L=C();c(`ThemePicker`);let R=_(`theme:toggleSyntaxHighlighting`,`ThemePicker`,`ctrl+t`);u(`theme:toggleSyntaxHighlighting`,()=>{if(O===null){let e=!F;m(`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)(x,{options:B,onFocus:e=>{j(e)},onChange:t=>{M(),e(t)},onCancel:g?()=>{P(),v?.()}:async()=>{P(),await y(0)},visibleOptionCount:B.length,defaultValue:w,defaultFocusValue:w})]}),(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)(S,{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:D})}),(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})}),!h&&(0,I.jsx)(f,{children:(0,I.jsx)(a,{dimColor:!0,italic:!0,children:z.pending?(0,I.jsxs)(I.Fragment,{children:[`Press `,z.keyName,` again to exit`]}):(0,I.jsxs)(s,{children:[(0,I.jsx)(o,{shortcut:`Enter`,action:`select`}),(0,I.jsx)(o,{shortcut:`Esc`,action:`cancel`})]})})})]})]})}var I,L=e((()=>{r(),P(),M(),l(),D(),j(),g(),O(),A(),h(),v(),b(),w(),I=p()}));export{L as n,F as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-80gRi2ZW.js";import{l as r,p as i}from"./debug-otxXY3j-.js";import{o as a,s as o}from"./log-DSV4Ht5l.js";import{r as s,t as c}from"./execFileNoThrow-azCkYhmF.js";import{b as l,x as u}from"./teammate-CbskW5G9.js";import{n as d,t as f}from"./sleep-C6koP5Ka.js";import{Ld as p,Nd as m}from"./loadAgentsDir-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-80gRi2ZW.js";import{l as r,p as i}from"./debug-otxXY3j-.js";import{o as a,s as o}from"./log-DSV4Ht5l.js";import{r as s,t as c}from"./execFileNoThrow-azCkYhmF.js";import{b as l,x as u}from"./teammate-CbskW5G9.js";import{n as d,t as f}from"./sleep-C6koP5Ka.js";import{Ld as p,Nd as m}from"./loadAgentsDir-BYWykYwn.js";import{c as h,n as g,o as _,r as v,s as y,t as b}from"./constants-BljlAJOX.js";import{l as x,n as S,o as C,r as w}from"./detection-95TCHkW8.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
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
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
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(`
|
|
@@ -1 +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-
|
|
1
|
+
import{o as e}from"./chunk-DR8-3Aex.js";import{Q as t,Rn as n,b as r,t as i,tt as a,x as o}from"./src-Di342QoJ.js";import{t as s}from"./jsx-runtime-D-D469L8.js";import{Cr as c,cn as l}from"./state-sIHsFpDu.js";import{Qa as u,Sc as d,ac as f,oo as p,yc as m}from"./paths-BZjPDxMm.js";import{_ as h,h as g}from"./debug-otxXY3j-.js";import{n as _,r as v}from"./analytics-DqMQntaB.js";import{n as y,t as b}from"./cwd--iizewsn.js";import{BD as x,CE as S,Da as C,Ea as w,Ry as T,Vw as E,aS as D,wE as O,zD as k,zw as A}from"./loadAgentsDir-BYWykYwn.js";import{qn as j}from"./prompt-BGNhFY1n.js";import{t as M}from"./useKeybinding-DPOUuymz.js";import{n as N,t as P}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";import{n as F,t as I}from"./PermissionDialog-R-Vl4Tk-.js";import{homedir as L}from"os";var R=e(n(),1),z=s();i(),l(),_(),y(),h(),m(),O(),M(),E(),T(),P(),F(),p(),j(),C(),x();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(u(`projectSettings`))&&e.push(`.claude/settings.json`),B(u(`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(k(`projectSettings`))&&e.push(`.claude/settings.json`),H(k(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function W(e){return!!e?.otelHeadersHelper}function G(){let e=[];return W(u(`projectSettings`))&&e.push(`.claude/settings.json`),W(u(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function K(e){return!!e?.apiKeyHelper}function q(){let e=[];return K(u(`projectSettings`))&&e.push(`.claude/settings.json`),K(u(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function J(e){return!!(e?.awsAuthRefresh||e?.awsCredentialExport)}function Y(){let e=[];return J(u(`projectSettings`))&&e.push(`.claude/settings.json`),J(u(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function X(e){return!!e?.gcpAuthRefresh}function Z(){let e=[];return X(u(`projectSettings`))&&e.push(`.claude/settings.json`),X(u(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function Q(e){return e?.env?Object.keys(e.env).some(e=>!w.has(e.toUpperCase())):!1}function $(){let e=[];return Q(u(`projectSettings`))&&e.push(`.claude/settings.json`),Q(u(`localSettings`))&&e.push(`.claude/settings.local.json`),e}j();function ee({onDone:e,commands:n}){let{servers:i}=A(`project`),s=Object.keys(i).length>0,l=V().length>0,u=U(),p=q().length>0,m=Y().length>0,h=Z().length>0,_=G().length>0,y=$().length>0,x=n?.some(e=>e.type===`prompt`&&e.loadedFrom===`commands_DEPRECATED`&&(e.source===`projectSettings`||e.source===`localSettings`)&&e.allowedTools?.some(e=>e===`Bash`||e.startsWith(`Bash(`)))??!1,C=n?.some(e=>e.type===`prompt`&&(e.loadedFrom===`skills`||e.loadedFrom===`plugin`)&&(e.source===`projectSettings`||e.source===`localSettings`||e.source===`plugin`)&&e.allowedTools?.some(e=>e===`Bash`||e.startsWith(`Bash(`)))??!1,w=u.length>0||x||C,T=f(),[E,O]=R.useState(null);R.useEffect(()=>{if(E!==null){let e=E,t=setTimeout(()=>S(e));return()=>clearTimeout(t)}},[E]),R.useEffect(()=>{v(`tengu_trust_dialog_shown`,{isHomeDir:L()===b(),hasMcpServers:s,hasHooks:l,hasBashExecution:w,hasApiKeyHelper:p,hasAwsCommands:m,hasGcpCommands:h,hasOtelHeadersHelper:_,hasDangerousEnvVars:y})},[s,l,w,p,m,h,_,y]);function k(t){if(t===`exit`){O(1);return}let n=L()===b();v(`tengu_trust_dialog_accept`,{isHomeDir:n,hasMcpServers:s,hasHooks:l,hasBashExecution:w,hasApiKeyHelper:p,hasAwsCommands:m,hasGcpCommands:h,hasOtelHeadersHelper:_,hasDangerousEnvVars:y}),n?c(!0):d(e=>({...e,hasTrustDialogAccepted:!0})),e()}let j=N(()=>O(1));return a(`confirm:no`,()=>{O(0)},{context:`Confirmation`}),E===null?T?(setTimeout(e),null):(0,z.jsx)(I,{color:`warning`,titleColor:`warning`,title:`Accessing workspace:`,children:(0,z.jsxs)(o,{flexDirection:`column`,gap:1,paddingTop:1,children:[(0,z.jsx)(r,{bold:!0,children:g().cwd()}),(0,z.jsx)(r,{children:`Is this a project you trust? (Your own code, a well-known open source project, or work from your team).`}),(0,z.jsx)(r,{children:`Once trusted, Claude Code can read, edit, and run commands in this folder.`}),(0,z.jsx)(r,{dimColor:!0,children:(0,z.jsx)(t,{url:`https://code.claude.com/docs/en/security`,children:`Security guide`})}),(0,z.jsx)(D,{options:[{label:`Yes, I trust this folder`,value:`enable_all`},{label:`No, exit`,value:`exit`}],onChange:e=>k(e),onCancel:()=>k(`exit`)}),(0,z.jsx)(r,{dimColor:!0,children:j.pending?(0,z.jsxs)(z.Fragment,{children:[`Press `,j.keyName,` again to exit`]}):(0,z.jsx)(z.Fragment,{children:`Enter to confirm · Esc to cancel`})})]})}):null}export{ee as TrustDialog};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./figures-gfT9mM8P.js";import{Rn as r,T as i,b as a,t as o,v as s,x as c}from"./src-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./figures-gfT9mM8P.js";import{Rn as r,T as i,b as a,t as o,v as s,x as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{dl as u,ul as d}from"./paths-BZjPDxMm.js";function f(e,t={}){let{showValues:n=!0,hideFunctions:r=!1,themeName:i=`dark`,treeCharColors:a={}}=t,o=[],c=new WeakSet;function l(e,t){return t?s(t,i)(e):e}function u(e,t,i,s=0){if(typeof e==`string`){o.push(t+l(e,a.value));return}if(typeof e!=`object`||!e){if(n){let n=String(e);o.push(t+l(n,a.value))}return}if(c.has(e)){o.push(t+l(`[Circular]`,a.value));return}c.add(e);let d=Object.keys(e).filter(t=>{let n=e[t];return!(r&&typeof n==`function`)});d.forEach((r,i)=>{let f=e[r],m=i===d.length-1,h=s===0&&i===0?``:t,g=l(m?p.lastBranch:p.branch,a.treeChar),_=r.trim()===``?``:l(r,a.key),v=h+g+(_?` `+_:``),y=r.trim()!==``;if(f&&typeof f==`object`&&c.has(f)){let e=l(`[Circular]`,a.value);o.push(v+(y?`: `:v?` `:``)+e)}else if(f&&typeof f==`object`&&!Array.isArray(f))o.push(v),u(f,h+l(m?p.empty:p.line,a.treeChar)+` `,m,s+1);else if(Array.isArray(f))o.push(v+(y?`: `:v?` `:``)+`[Array(`+f.length+`)]`);else if(n){let e=l(typeof f==`function`?`[Function]`:String(f),a.value);v+=(y?`: `:v?` `:``)+e,o.push(v)}else o.push(v)})}let d=Object.keys(e);if(d.length===0)return l(`(empty)`,a.value);if(d.length===1&&d[0]!==void 0&&d[0].trim()===``&&typeof e[d[0]]==`string`){let t=d[0],n=l(p.lastBranch,a.treeChar),r=l(e[t],a.value);return n+` `+r}return u(e,``,!0),o.join(`
|
|
2
2
|
`)}var p,m=e((()=>{t(),o(),p={branch:n.lineUpDownRight,lastBranch:n.lineUpRight,line:n.lineVertical,empty:` `}}));function h(e){let t={};return e.forEach(e=>{if(!e.path){t[``]=e.message;return}let n=e.path.split(`.`),r=e.path;if(e.invalidValue!==null&&e.invalidValue!==void 0&&n.length>0){let t=[];for(let r=0;r<n.length;r++){let i=n[r];if(i)if(!isNaN(parseInt(i,10))&&r===n.length-1){let n;n=typeof e.invalidValue==`string`?`"${e.invalidValue}"`:e.invalidValue===null?`null`:e.invalidValue===void 0?`undefined`:String(e.invalidValue),t.push(n)}else t.push(i)}r=t.join(`.`)}u(t,r,e.message,Object)}),t}function g({errors:e}){let[t]=i();if(e.length===0)return null;let n=e.reduce((e,t)=>{let n=t.file||`(file not specified)`;return e[n]||(e[n]=[]),e[n].push(t),e},{});return(0,_.jsx)(c,{flexDirection:`column`,children:Object.keys(n).sort().map(e=>{let r=n[e]||[];r.sort((e,t)=>!e.path&&t.path?-1:e.path&&!t.path?1:(e.path||``).localeCompare(t.path||``));let i=h(r),o=new Map;r.forEach(e=>{if(e.suggestion||e.docLink){let t=`${e.suggestion||``}|${e.docLink||``}`;o.has(t)||o.set(t,{suggestion:e.suggestion,docLink:e.docLink})}});let s=f(i,{showValues:!0,themeName:t,treeCharColors:{treeChar:`inactive`,key:`text`,value:`inactive`}});return(0,_.jsxs)(c,{flexDirection:`column`,children:[(0,_.jsx)(a,{children:e}),(0,_.jsx)(c,{marginLeft:1,children:(0,_.jsx)(a,{dimColor:!0,children:s})}),o.size>0&&(0,_.jsx)(c,{flexDirection:`column`,marginTop:1,children:Array.from(o.values()).map((e,t)=>(0,_.jsxs)(c,{flexDirection:`column`,marginBottom:1,children:[e.suggestion&&(0,_.jsx)(a,{dimColor:!0,wrap:`wrap`,children:e.suggestion}),e.docLink&&(0,_.jsxs)(a,{dimColor:!0,wrap:`wrap`,children:[`Learn more: `,e.docLink]})]},`suggestion-pair-${t}`))})]},e)})})}var _,v=e((()=>{d(),r(),o(),m(),_=l()}));export{v as n,g as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-DR8-3Aex.js";import{Rn as e,T as t,b as n,t as r,x as i}from"./src-
|
|
1
|
+
import"./chunk-DR8-3Aex.js";import{Rn as e,T as t,b as n,t as r,x as i}from"./src-Di342QoJ.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{a as o,n as s}from"./env-C2A9gV_G.js";e(),r(),o();var c=a(),l=58;function u(){let[e]=t(),r=`Welcome to Claude Code`;return s.terminal===`Apple_Terminal`?(0,c.jsx)(d,{theme:e,welcomeMessage:r}):[`light`,`light-daltonized`,`light-ansi`].includes(e)?(0,c.jsx)(i,{width:l,children:(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{color:`claude`,children:[r,` `]}),(0,c.jsxs)(n,{dimColor:!0,children:[`v`,`2.8.1`,` `]})]}),(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.1`,` `]})]}),(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.1`,` `]})]}),(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.1`,` `]})]}),(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};
|