@readmagic/workmate 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{AddWorkspaceDirectory-ClHi-Dr6.js → AddWorkspaceDirectory-CFrrXnt9.js} +1 -1
- package/dist/chunks/{App-BP06lHmf.js → App-Buad9Llp.js} +1 -1
- package/dist/chunks/{ApproveApiKey-Bsy8kr2a.js → ApproveApiKey-B2HJUD7h.js} +1 -1
- package/dist/chunks/ApproveApiKey-BQbHdvc3.js +1 -0
- package/dist/chunks/{AssistantSessionChooser-CcocKoTJ.js → AssistantSessionChooser-4lm4eXQ8.js} +1 -1
- package/dist/chunks/BackgroundTasksDialog-D4qA0M5O.js +2 -0
- package/dist/chunks/{BypassPermissionsModeDialog-BKj_3Idm.js → BypassPermissionsModeDialog-DllL8dxU.js} +1 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog--ywODh81.js +1 -0
- package/dist/chunks/{ClaudeMdExternalIncludesDialog-BD-7yAZh.js → ClaudeMdExternalIncludesDialog-BZSyRqeq.js} +1 -1
- package/dist/chunks/ConsoleOAuthFlow-Wkfw7Ts-.js +1 -0
- package/dist/chunks/{DesktopHandoff-BmPmCfT3.js → DesktopHandoff-DaP4Riar.js} +1 -1
- package/dist/chunks/{DiffDialog-C4XSSjvV.js → DiffDialog-B7hx8i_Y.js} +2 -2
- package/dist/chunks/Doctor-89OgoAUA.js +1 -0
- package/dist/chunks/Doctor-CuKJ-nGt.js +3 -0
- package/dist/chunks/ExitFlow-DnPydE17.js +2 -0
- package/dist/chunks/{Feedback-BaYA8-SU.js → Feedback-SmGiR3mf.js} +2 -2
- package/dist/chunks/{Grove-BJziCbZH.js → Grove-CjN9DO47.js} +1 -1
- package/dist/chunks/Grove-Cq88VBmM.js +1 -0
- package/dist/chunks/{HybridTransport-B8V6O6rM.js → HybridTransport-rK83Qijz.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-CHzBSJDf.js → InvalidConfigDialog-DdO0AxyF.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-BKenH3bD.js → InvalidSettingsDialog-s1G0DwXF.js} +1 -1
- package/dist/chunks/MCPConnectionManager-NRfIjdlj.js +1 -0
- package/dist/chunks/{McpParsingWarnings-Bj2-YL8o.js → McpParsingWarnings-Du5IxZos.js} +1 -1
- package/dist/chunks/MessageSelector-iIroHvXo.js +3 -0
- package/dist/chunks/Messages-D4Hm4gaY.js +11 -0
- package/dist/chunks/{Onboarding-BrAJp0aL.js → Onboarding-BiZByBK-.js} +1 -1
- package/dist/chunks/{OverageCreditUpsell-Ds1cB7RC.js → OverageCreditUpsell-BM7szLgm.js} +1 -1
- package/dist/chunks/PluginSettings-uY5KTCtK.js +17 -0
- package/dist/chunks/{PromptInputFooterSuggestions-egs9VvUs.js → PromptInputFooterSuggestions-BmsFdOu9.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-SieM5NoY.js → PromptInputHelpMenu-DX-0wEDo.js} +1 -1
- package/dist/chunks/QueryEngine-CGYaShXD.js +1 -0
- package/dist/chunks/REPL-CRJB2t2z.js +142 -0
- package/dist/chunks/REPL-u4Yq29Du.js +1 -0
- package/dist/chunks/{RemoteCallout-Cs-ro8_i.js → RemoteCallout-B-tyvQOe.js} +1 -1
- package/dist/chunks/{RemoteSessionManager-B740Dp6m.js → RemoteSessionManager-DCd0O5_l.js} +2 -2
- package/dist/chunks/ResumeConversation-DAAXlOCd.js +1 -0
- package/dist/chunks/{SSETransport-DtpMDekF.js → SSETransport-5VK5okFv.js} +1 -1
- package/dist/chunks/SearchExtraToolsTool-B-7Bworf.js +1 -0
- package/dist/chunks/Settings-CUjWlncb.js +2 -0
- package/dist/chunks/{TeleportProgress-rYaHIEfe.js → TeleportProgress-DxN0bQL2.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-DY97YZMB.js → TeleportRepoMismatchDialog-A5Ss0kuk.js} +1 -1
- package/dist/chunks/{TeleportResumeWrapper-jaQzyTCh.js → TeleportResumeWrapper-Bz14mUqR.js} +1 -1
- package/dist/chunks/{ThemePicker-BViWzLp3.js → ThemePicker-CVSRqTzW.js} +1 -1
- package/dist/chunks/TrustDialog-CY8an_Tg.js +1 -0
- package/dist/chunks/{ValidationErrorsList-B8pRiGuy.js → ValidationErrorsList-BYsDtAvX.js} +1 -1
- package/dist/chunks/{WelcomeV2-DqnbSdIu.js → WelcomeV2-C1BfrqC5.js} +1 -1
- package/dist/chunks/{add-dir-C2Hu3oE4.js → add-dir-DfLYgwox.js} +1 -1
- package/dist/chunks/{agentDisplay-XoDJhr03.js → agentDisplay-CMmHIl86.js} +1 -1
- package/dist/chunks/{agents-C4QXeHIJ.js → agents-DE_4mAHG.js} +1 -1
- package/dist/chunks/agents-DJtPfvnL.js +103 -0
- package/dist/chunks/allErrors-CQE2k0zO.js +1 -0
- package/dist/chunks/{ant-B6k6cBts.js → ant-ClQkuQjZ.js} +1 -1
- package/dist/chunks/{api-gqTA-D7n.js → api-2cdIPaeq.js} +1 -1
- package/dist/chunks/api-CG-lhKe-.js +1 -0
- package/dist/chunks/{assistant-DJ9hd4uC.js → assistant-Bje16tQx.js} +1 -1
- package/dist/chunks/auth-DMfEiQrC.js +1 -0
- package/dist/chunks/auth-D_cGl8WD.js +1 -0
- package/dist/chunks/{auth-BnSrKyJe.js → auth-DqcKPbw8.js} +1 -1
- package/dist/chunks/{autoMode-BNukrVAB.js → autoMode-ZW70mpr0.js} +5 -5
- package/dist/chunks/{autonomy-BEmI7WVW.js → autonomy-CwbWsCnv.js} +1 -1
- package/dist/chunks/autonomy-Oui8yK8G.js +15 -0
- package/dist/chunks/{autonomyPanel-fhge09AG.js → autonomyPanel-Mq50H7iM.js} +1 -1
- package/dist/chunks/backgroundHousekeeping-BpLtI45r.js +1 -0
- package/dist/chunks/backgroundHousekeeping-DtJNx4Ja.js +17 -0
- package/dist/chunks/{branch-Bpe-gocq.js → branch-DU5O9KZ0.js} +1 -1
- package/dist/chunks/{bridge-D12Shbkj.js → bridge-DNNxtPlz.js} +2 -2
- package/dist/chunks/{bridgeConfig-BhxRF2vm.js → bridgeConfig-CE6dMsiJ.js} +1 -1
- package/dist/chunks/bridgeConfig-DP9dD1Cv.js +1 -0
- package/dist/chunks/{bridgeEnabled-SbB-6zdY.js → bridgeEnabled-Cc0mGlTb.js} +1 -1
- package/dist/chunks/bridgeEnabled-D8wP3DWQ.js +1 -0
- package/dist/chunks/bridgeMain-CwxMa_pd.js +1 -0
- package/dist/chunks/bridgeMain-D11t1BYQ.js +68 -0
- package/dist/chunks/{bridgeMessaging-DHc5dOhB.js → bridgeMessaging-DdvApEqW.js} +1 -1
- package/dist/chunks/{bridgePointer-MqLe5Asm.js → bridgePointer-DqHMHa2B.js} +1 -1
- package/dist/chunks/{btw-D9hMM5d2.js → btw-CejSEdNl.js} +1 -1
- package/dist/chunks/{caches-UeVVM3T0.js → caches-5HVQSevy.js} +2 -2
- package/dist/chunks/caches-B-nJoHLM.js +1 -0
- package/dist/chunks/{ccrClient-Iza0L8Zw.js → ccrClient-BFyfO67b.js} +1 -1
- package/dist/chunks/{claudeDesktop-Cx31Ugjp.js → claudeDesktop-Fe-QL-sN.js} +1 -1
- package/dist/chunks/{clear-B4d38ssF.js → clear-D8m2utXW.js} +1 -1
- package/dist/chunks/client-C6MbjvOB.js +17 -0
- package/dist/chunks/client-DKXCfdde.js +1 -0
- package/dist/chunks/client-xxikkAoZ.js +1 -0
- package/dist/chunks/{color-D8VOyoYl.js → color-DWhgZH7A.js} +1 -1
- package/dist/chunks/commands-CxJpmEKF.js +1 -0
- package/dist/chunks/commitAttribution-DM6SBMwl.js +1 -0
- package/dist/chunks/{commitAttribution-ChAgixdj.js → commitAttribution-DPnHHKSA.js} +1 -1
- package/dist/chunks/compact-CblM7306.js +2 -0
- package/dist/chunks/config-BLVBFi5v.js +1 -0
- package/dist/chunks/config-CMnqm6Se.js +1 -0
- package/dist/chunks/{config-DmomySWC.js → config-DRDuVyzE.js} +2 -2
- package/dist/chunks/{context-Cl6BJ2vm.js → context-CdSMMM-0.js} +1 -1
- package/dist/chunks/context-noninteractive-CPkf2vB9.js +1 -0
- package/dist/chunks/{context-noninteractive-9hELVC29.js → context-noninteractive-DNury4JI.js} +5 -5
- package/dist/chunks/conversation-DCMw_rsE.js +1 -0
- package/dist/chunks/conversation-pUtvc-cE.js +1 -0
- package/dist/chunks/{createSSHSession-BM-5pbv6.js → createSSHSession-BOdTAX3N.js} +1 -1
- package/dist/chunks/{createSession-Cvl1Q50F.js → createSession-8Ei-Lj7V.js} +1 -1
- package/dist/chunks/createSession-CjqxVh_Q.js +1 -0
- package/dist/chunks/crossProjectResume-Bj_Pe8oe.js +40 -0
- package/dist/chunks/{datadog-CpqEQbHa.js → datadog-DqHxqiwY.js} +1 -1
- package/dist/chunks/{desktop-B_L6T6jI.js → desktop-Z5FAfunZ.js} +1 -1
- package/dist/chunks/{diff-CVzOodeg.js → diff-CJEKvOA5.js} +1 -1
- package/dist/chunks/doctor-BA2ZLDTl.js +1 -0
- package/dist/chunks/{entry-DHVYCR26.js → entry-DE0uMIf0.js} +4 -4
- package/dist/chunks/envLessBridgeConfig-B-LKYNvv.js +1 -0
- package/dist/chunks/envLessBridgeConfig-DyD9XCda.js +1 -0
- package/dist/chunks/{esm-D5q6s4l8.js → esm-5w3xFBnt.js} +1 -1
- package/dist/chunks/exit-Dt9kHtJO.js +1 -0
- package/dist/chunks/{extra-usage-zDHVtWKZ.js → extra-usage-C7E2Z1p1.js} +1 -1
- package/dist/chunks/extra-usage-D0Kkjp-2.js +1 -0
- package/dist/chunks/{extra-usage-core-BFOolqoi.js → extra-usage-core-DjdaD1qO.js} +1 -1
- package/dist/chunks/{extra-usage-noninteractive-cUGZy0en.js → extra-usage-noninteractive-BnD1RhKK.js} +1 -1
- package/dist/chunks/{extraUsage-Dq66zzqR.js → extraUsage-CpgRTcMk.js} +1 -1
- package/dist/chunks/extractMemories-DhUprYa7.js +1 -0
- package/dist/chunks/{fast-MS7WZpD8.js → fast-C4ZevUNL.js} +1 -1
- package/dist/chunks/fast-CChxlAAF.js +1 -0
- package/dist/chunks/{feedback-Fw4m28ZC.js → feedback-BIhBhV6n.js} +1 -1
- package/dist/chunks/{firstPartyEventLogger-CoSUd0a1.js → firstPartyEventLogger-BXY1IJ2D.js} +2 -2
- package/dist/chunks/firstPartyEventLogger-CnkGSojw.js +1 -0
- package/dist/chunks/{flushGate-De-yppeo.js → flushGate-CgHq81Gw.js} +1 -1
- package/dist/chunks/{gemini-BPziscyN.js → gemini-C1J-x1g7.js} +1 -1
- package/dist/chunks/generateRecap-C0jjCg0Z.js +1 -0
- package/dist/chunks/generateSessionName-w0BMtwS7.js +1 -0
- package/dist/chunks/{githubRepoPathMapping-qAoiyj6P.js → githubRepoPathMapping-8D0kpsif.js} +1 -1
- package/dist/chunks/{goal-CFx4eRkf.js → goal-B4GsR54_.js} +3 -3
- package/dist/chunks/grok-ffNyU3Lt.js +1 -0
- package/dist/chunks/{grove-CpqjcGCb.js → grove-BQisE2JM.js} +1 -1
- package/dist/chunks/{heapdump-C4kPlqGt.js → heapdump-DiCjAPR3.js} +1 -1
- package/dist/chunks/{help-B1h-faJ3.js → help-2hn8VK2-.js} +1 -1
- package/dist/chunks/hooks-CBmrBO-J.js +1 -0
- package/dist/chunks/{hooks-X6J03MnA.js → hooks-CkA9bhHl.js} +2 -2
- package/dist/chunks/inboundAttachments-C5K3XPTC.js +1 -0
- package/dist/chunks/{inboundAttachments-CUJE3KaU.js → inboundAttachments-IH-g95jo.js} +1 -1
- package/dist/chunks/initReplBridge-C-P4dgAG.js +1 -0
- package/dist/chunks/{install-D5YORIJL.js → install-Dzlm4u58.js} +1 -1
- package/dist/chunks/{instrumentation-Bw3CxPQf.js → instrumentation-Yt31gxWN.js} +3 -3
- package/dist/chunks/{job-DOWtcltx.js → job-BXujwZNa.js} +1 -1
- package/dist/chunks/{keybindings-BLw5J-Zj.js → keybindings-D8FXoO89.js} +2 -2
- package/dist/chunks/language-Baosud0X.js +1 -0
- package/dist/chunks/{language-C6Fq-XOZ.js → language-Ca4B018X.js} +1 -1
- package/dist/chunks/{launchAgentsPlatform-jWWf-Lk9.js → launchAgentsPlatform-D6DmNuDt.js} +1 -1
- package/dist/chunks/{launchLocalMemory-kHeD0I0y.js → launchLocalMemory-C0FzUq7x.js} +2 -2
- package/dist/chunks/{launchLocalVault-DLqkOjmb.js → launchLocalVault-DkYAre4O.js} +3 -3
- package/dist/chunks/{launchMemoryStores-Ct7AVXrO.js → launchMemoryStores-D2rKWAPs.js} +1 -1
- package/dist/chunks/{launchOnboarding-Cc6WwPX9.js → launchOnboarding-gOVAFEFp.js} +1 -1
- package/dist/chunks/{launchSchedule-ZyvuvjgU.js → launchSchedule-IZdFstT_.js} +1 -1
- package/dist/chunks/{launchSkillStore-BejQnLog.js → launchSkillStore-B7LamM1d.js} +1 -1
- package/dist/chunks/{launchTeleport-8CuYUfIR.js → launchTeleport-C2BQMfYP.js} +3 -3
- package/dist/chunks/{launchVault-DIvIOuPh.js → launchVault-C60WUcCI.js} +1 -1
- package/dist/chunks/{lazySchema-DcIJE_0i.js → lazySchema-DULtBUCI.js} +1 -1
- package/dist/chunks/loadAgentsDir-B9c3Emvg.js +1 -0
- package/dist/chunks/{loadAgentsDir-D206qwP3.js → loadAgentsDir-x3rlgED4.js} +690 -692
- package/dist/chunks/loadPluginHooks-BhNdAjeY.js +1 -0
- package/dist/chunks/localSearch-BLCGsdyM.js +1 -0
- package/dist/chunks/{localSearch-CzrbOklu.js → localSearch-DtplGF-l.js} +1 -1
- package/dist/chunks/{logoV2Utils-8M56V7oN.js → logoV2Utils-gGK9gErT.js} +1 -1
- package/dist/chunks/{magicDocs-DWjL2k7P.js → magicDocs-qdDB_mKb.js} +2 -2
- package/dist/chunks/{main-BohPzJFF.js → main-OWFSddRx.js} +82 -82
- package/dist/chunks/managedEnv-Aq5BXfY7.js +1 -0
- package/dist/chunks/managedEnv-BHoeDjpS.js +1 -0
- package/dist/chunks/managedEnvConstants-BPwL2aWI.js +1 -0
- package/dist/chunks/{mappers-BDMZFgKx.js → mappers-04gNXJ3w.js} +1 -1
- package/dist/chunks/mcp-BSNdwbxR.js +1 -0
- package/dist/chunks/mcp-CMnDNI-4.js +6 -0
- package/dist/chunks/mcp-D1yA9E56.js +2 -0
- package/dist/chunks/memory-D1zbyjxN.js +1 -0
- package/dist/chunks/{mode-CUkHFkju.js → mode-DY087x_x.js} +2 -2
- package/dist/chunks/{model-CKkOnnnx.js → model-CZViyZnE.js} +1 -1
- package/dist/chunks/{model-BY3auM2c.js → model-D0EfJBuw.js} +1 -1
- package/dist/chunks/model-DLLkVV6S.js +1 -0
- package/dist/chunks/{nativeInstaller-CA5d6_G7.js → nativeInstaller-yj81F75v.js} +1 -1
- package/dist/chunks/onChangeAppState-DhGKPG9g.js +1 -0
- package/dist/chunks/{openai-Cbomn0Ws.js → openai-EYRnUsco.js} +3 -3
- package/dist/chunks/{overageCreditGrant-DsUrmeBh.js → overageCreditGrant-Du3dOYVu.js} +1 -1
- package/dist/chunks/{panelCall-BsVoL1uF.js → panelCall-dMvRPAGE.js} +1 -1
- package/dist/chunks/{partition-BAakXjvj.js → partition-C4FWzYVm.js} +1 -1
- package/dist/chunks/{passes-CLRt7Cvm.js → passes-Daz-ARWD.js} +1 -1
- package/dist/chunks/permissions-DF8tAmDF.js +3 -0
- package/dist/chunks/{pidLock-D5rUnDB-.js → pidLock-CbC_il6r.js} +2 -2
- package/dist/chunks/{plan-SYZ4DXR8.js → plan-rsb_83Fo.js} +1 -1
- package/dist/chunks/{plugin-Bfjzhmrk.js → plugin-Cm31-nej.js} +1 -1
- package/dist/chunks/pluginAutoupdate-0k03PVff.js +1 -0
- package/dist/chunks/pluginBlocklist-wPFCUPdm.js +1 -0
- package/dist/chunks/pluginCliCommands-DhL9LbH0.js +1 -0
- package/dist/chunks/{pluginFlagging-D9HKAGBC.js → pluginFlagging-CAdaFV_D.js} +1 -1
- package/dist/chunks/pluginOperations-Cs_Z4C6O.js +2 -0
- package/dist/chunks/pluginStartupCheck-BRXGKGjG.js +1 -0
- package/dist/chunks/pluginStartupCheck-KeU0efTj.js +1 -0
- package/dist/chunks/{plugins-Dn6ceWrT.js → plugins-CQNKZmjP.js} +4 -4
- package/dist/chunks/policyLimits-D2s8M8P2.js +1 -0
- package/dist/chunks/{pollConfig-DH2oCtFS.js → pollConfig-2nFzv6Hy.js} +1 -1
- package/dist/chunks/{poor-j-y-bv8o.js → poor-DXumVTR4.js} +1 -1
- package/dist/chunks/{poorMode-DhzFKpPl.js → poorMode-CBOtooa0.js} +1 -1
- package/dist/chunks/poorMode-yNZL5uYf.js +1 -0
- package/dist/chunks/print-uxCF5ka5.js +23 -0
- package/dist/chunks/{privacy-settings-DHMJREbb.js → privacy-settings-BncbJCV0.js} +1 -1
- package/dist/chunks/processBashCommand-CGdwvPmD.js +1 -0
- package/dist/chunks/processSlashCommand-DQarepEb.js +5 -0
- package/dist/chunks/prompt-BgOdcHkd.js +1 -0
- package/dist/chunks/{prompt-BNHtszmZ.js → prompt-CE3sFmZV.js} +5 -5
- package/dist/chunks/prompt-CLJKFebn.js +1 -0
- package/dist/chunks/{promptEditor-DeMrXUir.js → promptEditor-CyTzyjwG.js} +2 -2
- package/dist/chunks/{protocolHandler-BHxBy84Z.js → protocolHandler-JR8pASdH.js} +1 -1
- package/dist/chunks/rate-limit-options-C-EqWjeI.js +1 -0
- package/dist/chunks/{rcDebugLog-CUy1_F23.js → rcDebugLog-DBB9r8aw.js} +1 -1
- package/dist/chunks/reconciler-CYD_XpG4.js +4 -0
- package/dist/chunks/{referral-CUaIo_vT.js → referral-CKmHHxj_.js} +1 -1
- package/dist/chunks/refresh-ZqZdmLK5.js +1 -0
- package/dist/chunks/{registerProtocol-B7Fzdofu.js → registerProtocol-wZv2uiW_.js} +1 -1
- package/dist/chunks/{release-notes-fbfv2DC0.js → release-notes-B5K7wVqZ.js} +1 -1
- package/dist/chunks/{releaseNotes-CxAHFLPl.js → releaseNotes-B8gbyFFJ.js} +2 -2
- package/dist/chunks/{reload-plugins-B9IT9CFA.js → reload-plugins-B9ApSp2m.js} +1 -1
- package/dist/chunks/{remote-env-BOklGlll.js → remote-env-CAt1dHIS.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-j0bG1zjv.js → remoteBridgeCore-Bk3UdSLJ.js} +1 -1
- package/dist/chunks/remoteManagedSettings-bswzAB6W.js +1 -0
- package/dist/chunks/rename-CE_U6KE6.js +1 -0
- package/dist/chunks/{resume-y7MCTZHJ.js → resume-BicEjsPd.js} +2 -2
- package/dist/chunks/{runtimeObserver-CyzLASla.js → runtimeObserver-BrGF5QWX.js} +4 -4
- package/dist/chunks/{runtimeObserver-BZcJ1FbH.js → runtimeObserver-CiwnPFjK.js} +1 -1
- package/dist/chunks/sandbox-adapter-BtMiHImm.js +1 -0
- package/dist/chunks/{sandbox-toggle-CWpBO228.js → sandbox-toggle-D8eebdyI.js} +1 -1
- package/dist/chunks/searchExtraTools-hLLPuh7c.js +1 -0
- package/dist/chunks/{session-DL4cA_8l.js → session-BZIlR9Gc.js} +2 -2
- package/dist/chunks/{sessionDiscovery-DAfNKqp1.js → sessionDiscovery-DfDqTrF1.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-Bm8wiqwe.js +1 -0
- package/dist/chunks/sessionMemory-D37S0-jX.js +1 -0
- package/dist/chunks/sessionMemory-DmlAG3jq.js +1 -0
- package/dist/chunks/sessionMemoryUtils-6EWDHSGU.js +1 -0
- package/dist/chunks/sessionObserver-BUw2rzKl.js +1 -0
- package/dist/chunks/{sessionObserver-ShbCwJ8x.js → sessionObserver-KgquhGWw.js} +1 -1
- package/dist/chunks/sessionStorage-CucBSK5Q.js +1 -0
- package/dist/chunks/{sessionTitle-coed9IuJ.js → sessionTitle-DAnM73S0.js} +2 -2
- package/dist/chunks/{sessionTracing-D9rUyiq0.js → sessionTracing-_Hh5VXxt.js} +1 -1
- package/dist/chunks/settings-BeLFUeie.js +19 -0
- package/dist/chunks/settings-Cl16Haug.js +1 -0
- package/dist/chunks/settingsSync-BNvFYH3c.js +1 -0
- package/dist/chunks/setup-D8kXv3ts.js +3 -0
- package/dist/chunks/{shadowedRuleDetection-D1wsAdpp.js → shadowedRuleDetection-C6R5zOUe.js} +1 -1
- package/dist/chunks/{sideQuestion-wSi38p81.js → sideQuestion-hUhxls9r.js} +3 -3
- package/dist/chunks/{sinks-C_Dl1p4K.js → sinks-BuE17DeZ.js} +2 -2
- package/dist/chunks/sinks-FevoYQqP.js +1 -0
- package/dist/chunks/{skill-learning-B5tmc7EX.js → skill-learning-CMdxGtxr.js} +1 -1
- package/dist/chunks/skillChangeDetector-C65ZLSYV.js +1 -0
- package/dist/chunks/{skillGapStore-Df5BWAk5.js → skillGapStore-D18LRJAM.js} +2 -2
- package/dist/chunks/{skillGapStore-D-kQKVDZ.js → skillGapStore-Ep62R-2_.js} +1 -1
- package/dist/chunks/{skillGenerator-DbcdpAkw.js → skillGenerator-Bc7WwNT8.js} +2 -2
- package/dist/chunks/{skillLearning-ClRiDcJH.js → skillLearning-Cs9fJgkV.js} +1 -1
- package/dist/chunks/skillLearning-duPZl69A.js +1 -0
- package/dist/chunks/{skillPanel-LBd4E-MM.js → skillPanel-Cyzby746.js} +3 -3
- package/dist/chunks/{skillSearchPanel-CErRnUwo.js → skillSearchPanel-Cll9ccA5.js} +4 -4
- package/dist/chunks/{skills-CBKhfg_a.js → skills-BPPeYBy7.js} +1 -1
- package/dist/chunks/{stats-BY4dskVg.js → stats-CqfF4Axp.js} +1 -1
- package/dist/chunks/{status-DU-B4SMW.js → status-CC9Q-2Yn.js} +1 -1
- package/dist/chunks/{status-BnJIXtKl.js → status-D4IQpsNK.js} +2 -2
- package/dist/chunks/statusNoticeHelpers-CEGvdm5d.js +1 -0
- package/dist/chunks/syncCache-CANQZ9mQ.js +1 -0
- package/dist/chunks/{tag-B-wVW9Aj.js → tag-DDbNqBMu.js} +2 -2
- package/dist/chunks/{tasks-CBVL005y.js → tasks-CZvWJYGr.js} +1 -1
- package/dist/chunks/teleport-Dk5j03Ix.js +1 -0
- package/dist/chunks/{templateJobs-D6998LcG.js → templateJobs-D1BdhZsv.js} +1 -1
- package/dist/chunks/{terminalSetup-CuV-qU6v.js → terminalSetup-3JNy6i_J.js} +5 -5
- package/dist/chunks/{terminalSetup-0SBdyKF5.js → terminalSetup-Cn6jeYw1.js} +1 -1
- package/dist/chunks/{theme-p0AooruD.js → theme-Cg4GNOoQ.js} +1 -1
- package/dist/chunks/thinkback-p-vKIRW_.js +1 -0
- package/dist/chunks/thinkback-play-DnPTDE8B.js +1 -0
- package/dist/chunks/{thinkback-DI2NpvG-.js → thinkback-rFA1do6F.js} +1 -1
- package/dist/chunks/{toolEventObserver-DlH73w-S.js → toolEventObserver-CzsCuUMc.js} +1 -1
- package/dist/chunks/{toolEventObserver-DTccwC3c.js → toolEventObserver-SFwURL5F.js} +1 -1
- package/dist/chunks/toolPool-BR27AMJO.js +1 -0
- package/dist/chunks/trustedDevice-BYt39fui.js +1 -0
- package/dist/chunks/{trustedDevice-BTYoQCkC.js → trustedDevice-CKedohmT.js} +1 -1
- package/dist/chunks/{types-C-MRCL8J.js → types-Dut4311z.js} +2 -2
- package/dist/chunks/{ultrareviewCommand-BDFUS3hf.js → ultrareviewCommand-C_4OSBTW.js} +2 -2
- package/dist/chunks/{undercover-vuTpCnQJ.js → undercover-D30rKimg.js} +1 -1
- package/dist/chunks/undercover-DRSwLozU.js +1 -0
- package/dist/chunks/{updateCCB-DFL5Wt_I.js → updateCCB-C2G-U-qA.js} +1 -1
- package/dist/chunks/upgrade-Bi-bIz7R.js +1 -0
- package/dist/chunks/{upgrade-D5qwcaWQ.js → upgrade-Chs-OQFd.js} +1 -1
- package/dist/chunks/{upload-B_yADHX9.js → upload-D8FWMSQx.js} +1 -1
- package/dist/chunks/{usage-C0SnnC-i.js → usage-BxVeUt60.js} +1 -1
- package/dist/chunks/usage-DUO7Yy1f.js +1 -0
- package/dist/chunks/{useExitOnCtrlCDWithKeybindings-DKIqRraH.js → useExitOnCtrlCDWithKeybindings-BwsZ5f0s.js} +1 -1
- package/dist/chunks/useMainLoopModel-Gy1Vv4Qr.js +1 -0
- package/dist/chunks/useManagePlugins-B11_87VN.js +1 -0
- package/dist/chunks/useMergedTools-CR56my9t.js +1 -0
- package/dist/chunks/{useSearchInput-D1Vr2Js1.js → useSearchInput-C5OzQnX6.js} +1 -1
- package/dist/chunks/{useSettingsErrors-B7BXHchG.js → useSettingsErrors-B9vOZL41.js} +1 -1
- package/dist/chunks/{util-BaDs-wL5.js → util-8EHwfg4A.js} +1 -1
- package/dist/chunks/validatePlugin-6q1qmnAC.js +1 -0
- package/dist/chunks/{vim-C-icQDz1.js → vim-CNDzwoTd.js} +1 -1
- package/dist/chunks/{workerRegistry-ChqPPIaO.js → workerRegistry-CvyHvwx-.js} +1 -1
- package/dist/chunks/worktree-ogmNCIpz.js +1 -0
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/ApproveApiKey-a2ZonQ3n.js +0 -1
- package/dist/chunks/BackgroundTasksDialog-DNeBhGCf.js +0 -2
- package/dist/chunks/ClaudeMdExternalIncludesDialog-DFivNFuo.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-CS3zjEPF.js +0 -1
- package/dist/chunks/Doctor-BhD-ZzZm.js +0 -1
- package/dist/chunks/Doctor-DEQe2q16.js +0 -3
- package/dist/chunks/ExitFlow-BttnAv-O.js +0 -2
- package/dist/chunks/Grove-sWm-oLBf.js +0 -1
- package/dist/chunks/MCPConnectionManager-CNh9dNlk.js +0 -1
- package/dist/chunks/MessageSelector-DdR6wJhh.js +0 -3
- package/dist/chunks/Messages-Ch6cboMV.js +0 -11
- package/dist/chunks/PluginSettings-CGqEzejq.js +0 -17
- package/dist/chunks/QueryEngine-CZZMl3PB.js +0 -1
- package/dist/chunks/REPL-CG2N7E4Q.js +0 -142
- package/dist/chunks/REPL-DvA910N_.js +0 -1
- package/dist/chunks/ResumeConversation-DzV2zmuX.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-C4uO-Zx3.js +0 -1
- package/dist/chunks/Settings-XKw6FI_m.js +0 -2
- package/dist/chunks/TrustDialog-DGJ_BisZ.js +0 -1
- package/dist/chunks/agents-BIHTGDYh.js +0 -103
- package/dist/chunks/allErrors-1896uQA1.js +0 -1
- package/dist/chunks/api-BsFW57_Q.js +0 -1
- package/dist/chunks/auth-8Vd3_U8t.js +0 -1
- package/dist/chunks/auth-DRTjfnGy.js +0 -1
- package/dist/chunks/autonomy-DGcy5Rml.js +0 -15
- package/dist/chunks/backgroundHousekeeping-3i_d_WW5.js +0 -1
- package/dist/chunks/backgroundHousekeeping-BVMf_Tjn.js +0 -17
- package/dist/chunks/bridgeConfig-CqIQ_rvD.js +0 -1
- package/dist/chunks/bridgeEnabled-D0XC5kNh.js +0 -1
- package/dist/chunks/bridgeMain-DHUpZFgL.js +0 -68
- package/dist/chunks/bridgeMain-DUbQjgCp.js +0 -1
- package/dist/chunks/caches-CWzT7e6Y.js +0 -1
- package/dist/chunks/client-BzKQTXzF.js +0 -1
- package/dist/chunks/commands-DDamMmo4.js +0 -1
- package/dist/chunks/commitAttribution-CgohL8vD.js +0 -1
- package/dist/chunks/compact-IFHwxjZ9.js +0 -2
- package/dist/chunks/config-DY5-_kk_.js +0 -1
- package/dist/chunks/config-WxgxrQoP.js +0 -1
- package/dist/chunks/context-noninteractive-Beij5MfU.js +0 -1
- package/dist/chunks/conversation-BBB91hEw.js +0 -1
- package/dist/chunks/conversation-BWVTM40Y.js +0 -1
- package/dist/chunks/createSession-CoQtL5Rj.js +0 -1
- package/dist/chunks/crossProjectResume-BasMLl2n.js +0 -40
- package/dist/chunks/doctor-1L0TFuGw.js +0 -1
- package/dist/chunks/envLessBridgeConfig-CN0_44-p.js +0 -1
- package/dist/chunks/envLessBridgeConfig-Ck2-KMq0.js +0 -1
- package/dist/chunks/exit-Bm1S_f3i.js +0 -1
- package/dist/chunks/extra-usage-UHAWtypK.js +0 -1
- package/dist/chunks/extractMemories-BcaklA33.js +0 -1
- package/dist/chunks/fast-DALAHO3d.js +0 -1
- package/dist/chunks/firstPartyEventLogger-CS9jVz6D.js +0 -1
- package/dist/chunks/generateRecap-jGDLI_wU.js +0 -1
- package/dist/chunks/generateSessionName-hDJ6HBJ1.js +0 -1
- package/dist/chunks/grok-Byblph7F.js +0 -1
- package/dist/chunks/hooks-DPLIIpAD.js +0 -1
- package/dist/chunks/inboundAttachments-BekVc0W-.js +0 -1
- package/dist/chunks/initReplBridge-JQ-afRx9.js +0 -1
- package/dist/chunks/language-Cqw5gYJR.js +0 -1
- package/dist/chunks/loadAgentsDir-TZjwTqdr.js +0 -1
- package/dist/chunks/loadPluginHooks-Ddhsyn0_.js +0 -1
- package/dist/chunks/localSearch-DrOAL6f4.js +0 -1
- package/dist/chunks/mcp-Bt1ITh-Z.js +0 -1
- package/dist/chunks/mcp-CwJ-AIpt.js +0 -6
- package/dist/chunks/mcp-W0LFoyFR.js +0 -2
- package/dist/chunks/memory-3wV7m7UU.js +0 -1
- package/dist/chunks/model-DRXcJyU9.js +0 -1
- package/dist/chunks/onChangeAppState-DBmy2Ow_.js +0 -1
- package/dist/chunks/permissions-BVSFuwNP.js +0 -3
- package/dist/chunks/pluginAutoupdate-reO2PgtQ.js +0 -1
- package/dist/chunks/pluginBlocklist-C3H2afWG.js +0 -1
- package/dist/chunks/pluginCliCommands-lqdxdkQp.js +0 -1
- package/dist/chunks/pluginOperations-EN3EKLux.js +0 -2
- package/dist/chunks/pluginStartupCheck-BY73BMT2.js +0 -1
- package/dist/chunks/pluginStartupCheck-CwWOlveD.js +0 -1
- package/dist/chunks/policyLimits-CkTI5KEt.js +0 -1
- package/dist/chunks/poorMode-V11s-3cf.js +0 -1
- package/dist/chunks/print-Db_VXmfO.js +0 -23
- package/dist/chunks/processBashCommand-BcM_fhV9.js +0 -1
- package/dist/chunks/processSlashCommand-DEVo3GPX.js +0 -5
- package/dist/chunks/prompt-CrX31AGm.js +0 -1
- package/dist/chunks/prompt-IAvMxKDl.js +0 -1
- package/dist/chunks/rate-limit-options-DIudL9fb.js +0 -1
- package/dist/chunks/reconciler-BXpPyfSY.js +0 -4
- package/dist/chunks/refresh-CuaVBIQ0.js +0 -1
- package/dist/chunks/remoteManagedSettings-Cq994lyc.js +0 -1
- package/dist/chunks/rename-Iev7wQsI.js +0 -1
- package/dist/chunks/sandbox-adapter-Cu1FYrkh.js +0 -1
- package/dist/chunks/searchExtraTools-BUOUds7p.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-2cgIIxPk.js +0 -1
- package/dist/chunks/sessionMemory-BS8_TbKj.js +0 -1
- package/dist/chunks/sessionMemory-D5fSHXvZ.js +0 -1
- package/dist/chunks/sessionMemoryUtils-BWUztNh6.js +0 -1
- package/dist/chunks/sessionObserver-ChfQtK2m.js +0 -1
- package/dist/chunks/sessionStorage-Cf5wmnyB.js +0 -1
- package/dist/chunks/settings-BovzmwMP.js +0 -19
- package/dist/chunks/settingsSync-PqU9XGJq.js +0 -1
- package/dist/chunks/setup-B_FOvNpp.js +0 -3
- package/dist/chunks/sinks-BpcRrN_T.js +0 -1
- package/dist/chunks/skillChangeDetector-DNqohXxz.js +0 -1
- package/dist/chunks/skillLearning-C5cXZE6_.js +0 -1
- package/dist/chunks/statusNoticeHelpers-CzTuGNuC.js +0 -1
- package/dist/chunks/teleport-dtqQXM4x.js +0 -1
- package/dist/chunks/thinkback-Catprqs_.js +0 -1
- package/dist/chunks/thinkback-play-CqrIRx2o.js +0 -1
- package/dist/chunks/toolPool-B64V-jmK.js +0 -1
- package/dist/chunks/trustedDevice-CiwjT_Y6.js +0 -1
- package/dist/chunks/undercover-XYapZ_SS.js +0 -1
- package/dist/chunks/upgrade-DIg3j929.js +0 -1
- package/dist/chunks/usage-CYJKE8N6.js +0 -1
- package/dist/chunks/useMainLoopModel-XetDUXd-.js +0 -1
- package/dist/chunks/useManagePlugins-B2KhKiu5.js +0 -1
- package/dist/chunks/useMergedTools-CKvwz_Zt.js +0 -1
- package/dist/chunks/validatePlugin-DtiYlXby.js +0 -1
- package/dist/chunks/worktree-DAn8ooa1.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./REPL-CRJB2t2z.js";export{e as REPL};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,P as r,fi as i,t as a}from"./src-CDCSSo0U2.js";import{t as o}from"./jsx-runtime-Bb4Xn-E0.js";import{
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,P as r,fi as i,t as a}from"./src-CDCSSo0U2.js";import{t as o}from"./jsx-runtime-Bb4Xn-E0.js";import{ax as s,ix as c}from"./loadAgentsDir-x3rlgED4.js";import{b as l,c as u,g as d}from"./config-DRDuVyzE.js";import{Bt as f,Ot as p}from"./model-CZViyZnE.js";import{i as m,r as h}from"./bridgeEnabled-Cc0mGlTb.js";import{n as g,t as _}from"./PermissionDialog-0ya1CU5k.js";function v({onDone:e}){let t=(0,b.useRef)(e);t.current=e;let i=(0,b.useCallback)(()=>{t.current(`dismiss`)},[]);(0,b.useEffect)(()=>{l(e=>e.remoteDialogSeen?e:{...e,remoteDialogSeen:!0})},[]);let a=(0,b.useCallback)(e=>{t.current(e)},[]);return(0,x.jsx)(_,{title:`Remote Control`,children:(0,x.jsxs)(n,{flexDirection:`column`,paddingX:2,paddingY:1,children:[(0,x.jsxs)(n,{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)(n,{children:(0,x.jsx)(c,{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:a,onCancel:i})})]})})}function y(){return!(u().remoteDialogSeen||!m()||!p()?.accessToken)}var b,x,S=e((()=>{b=t(i(),1),h(),a(),f(),d(),s(),g(),x=o()}));export{S as n,y as r,v as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{n as r,t as i}from"./defineProperty-C-QyHrDq.js";import{I as a,P as o,di as s,fi as c,j as l,t as u,ui as ee}from"./src-CDCSSo0U2.js";import{t as d}from"./jsx-runtime-Bb4Xn-E0.js";import{
|
|
2
|
-
`)){let e=t.trim();e&&n.set(e,(n.get(e)??0)+1)}};if(e){let{stdout:n}=await z(`git`,[...t,`--author=${e}`],{cwd:C()});r(n)}if(n.size<10){let{stdout:e}=await z(Se(),t,{cwd:C()});r(e)}return lt(Array.from(n.entries()).sort((e,t)=>t[1]-e[1]).map(([e])=>e),5)}catch(e){return V(e),[]}}var dt=10080*60*1e3,ft=t(()=>{let e=L(),t=e.exampleFiles?.length?g(e.exampleFiles):`<filepath>`;return`Try "${g([`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...`])}"`}),pt=t(async()=>{let e=L();Date.now()-(e.exampleFilesGeneratedAt??0)>dt&&(e.exampleFiles=[]),e.exampleFiles?.length||ut().then(e=>{e.length&&be(t=>({...t,exampleFiles:e,exampleFilesGeneratedAt:Date.now()}))})});Fe();var mt={"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 ht(e){let t=e.toLowerCase(),n=je();for(let[e,r]of Object.entries(mt)){let i=r.retirementDates[n];if(!(!t.includes(e)||!i))return{isDeprecated:!0,modelName:r.modelName,retirementDate:i}}return{isDeprecated:!1}}function gt(e){if(!e)return null;let t=ht(e);return t.isDeprecated?`⚠ ${t.modelName} will be retired on ${t.retirementDate}. Consider switching to a newer model.`:null}r(),s(),O(),w(),T(),Te(),ke(),M(),Ae(),Xe(),ue(),ae(),x();var G=e(c(),1);u(),Ee(),I(),pe(),it(),Ze();var K=d(),_t={enable_shortcut_tip:!1,enable_startup_dialog:!1};function q(){return _t}function vt(){return process.platform===`darwin`||process.platform===`win32`&&process.arch===`x64`}function yt(){if(!vt()||!q().enable_startup_dialog)return!1;let e=F();return!(e.desktopUpsellDismissed||(e.desktopUpsellSeenCount??0)>=3)}function bt({onDone:e}){let[t,n]=(0,G.useState)(!1);if((0,G.useEffect)(()=>{let e=(F().desktopUpsellSeenCount??0)+1;P(t=>(t.desktopUpsellSeenCount??0)>=e?t:{...t,desktopUpsellSeenCount:e}),De(`tengu_desktop_upsell_shown`,{seen_count:e})},[]),t)return(0,K.jsx)(at,{onDone:()=>e()});function r(t){switch(t){case`try`:n(!0);return;case`never`:P(e=>e.desktopUpsellDismissed?e:{...e,desktopUpsellDismissed:!0}),e();return;case`not-now`:e();return}}return(0,K.jsx)(Qe,{title:`Try Claude Code Desktop`,children:(0,K.jsxs)(a,{flexDirection:`column`,paddingX:2,paddingY:1,children:[(0,K.jsx)(a,{marginBottom:1,children:(0,K.jsx)(o,{children:`Same Claude Code with visual diffs, live app preview, parallel sessions, and more.`})}),(0,K.jsx)(me,{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`)})]})})}Ne(),he(),W(),He(),m(),te(),v(),ne(),qe(),et(),nt(),I();function xt(e){let t=F().numStartups;P(n=>{let r=n.tipsHistory??{};return r[e]===t?n:{...n,tipsHistory:{...r,[e]:t}}})}function J(e){let t=F(),n=t.tipsHistory?.[e];return n?t.numStartups-n:1/0}u(),I(),A(),R();var Y;async function St(){return Y===void 0&&(Y=f in await _()),Y}async function X(e,t,n){if(!await St()||p(`${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&&Be(t.readFileState).some(e=>n.filePath.test(e)))}var Ct=[{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 F().numStartups<10}},{id:`plan-mode-for-complex-tasks`,content:async()=>`Use Plan Mode to prepare for a complex request before making changes. Press ${h(`chat:cycleMode`,`Chat`,`shift+tab`)} twice to enable.`,cooldownSessions:5,isRelevant:async()=>{let e=F();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=F(),t=j(),n=!!e.lastPlanModeUse,r=!!t?.permissions?.defaultMode;return n&&!r}catch(e){return E(`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=F();return await Ce()<=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()=>!y()&&await ie()>=2},{id:`terminal-setup`,content:async()=>k.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=F();return k.terminal===`Apple_Terminal`?!e.optionAsMetaKeyInstalled:!e.shiftEnterKeyBindingInstalled}},{id:`shift-enter`,content:async()=>k.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=F();return!!((k.terminal===`Apple_Terminal`?e.optionAsMetaKeyInstalled:e.shiftEnterKeyBindingInstalled)&&e.numStartups>3)}},{id:`shift-enter-setup`,content:async()=>k.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(!Ye())return!1;let e=F();return!(k.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 F().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&&ee.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()=>H()===`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()=>j().statusLine===void 0},{id:`prompt-queue`,content:async()=>`Hit Enter to queue up additional messages while Claude is working.`,cooldownSessions:5,async isRelevant(){return F().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 '${k.terminal===`vscode`?`code`:k.terminal}' command in PATH" to enable IDE integration`,cooldownSessions:0,async isRelevant(){if(!oe()||H()!==`macos`)return!1;switch(k.terminal){case`vscode`:return!await se();case`cursor`:return!await fe();case`windsurf`:return!await le();default:return!1}}},{id:`ide-upsell-external-terminal`,content:async()=>`Connect Claude to your IDE · /ide`,cooldownSessions:4,async isRelevant(){return b()||(await de()).length!==0?!1:(await ge()).length>0}},{id:`permissions`,content:async()=>`Use /permissions to pre-approve and pre-deny bash, edit, and MCP tools`,cooldownSessions:10,async isRelevant(){return F().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()=>!k.isSSH()},{id:`paste-images-mac`,content:async()=>`Paste images into Work Mate using control+v (not cmd+v!)`,cooldownSessions:10,isRelevant:async()=>H()===`macos`},{id:`double-esc`,content:async()=>`Double-tap esc to rewind the conversation to a previous point in time`,cooldownSessions:10,isRelevant:async()=>!S()},{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()=>S()},{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()=>ce()&&F().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 F().numStartups>10}},{id:`shift-tab`,content:async()=>`Hit ${h(`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 ${h(`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 F().numStartups>5}},{id:`agent-flag`,content:async()=>`Use --agent <agent_name> to directly start a conversation with a subagent`,cooldownSessions:15,async isRelevant(){return F().numStartups>5}},{id:`desktop-app`,content:async()=>`Run Work Mate locally or remotely using the Claude desktop app: clau.de/desktop`,cooldownSessions:15,isRelevant:async()=>H()!==`linux`},{id:`desktop-shortcut`,content:async e=>`Continue your session in Work Mate Desktop with ${l(`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:`opusplan-mode-reminder`,content:async()=>`Your default model setting is Opus Plan Mode. Press ${h(`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=F(),t=Pe()===`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${l(`suggestion`,e?.theme??`dark`)(`/plugin install frontend-design@${f}`)}`,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${l(`suggestion`,e?.theme??`dark`)(`/plugin install vercel@${f}`)}`,cooldownSessions:3,isRelevant:async e=>X(`vercel`,e,{filePath:/(?:^|[/\\])vercel\.json$/i,cli:[`vercel`]})},{id:`subagent-fanout-nudge`,content:async e=>`Say ${l(`suggestion`,e?.theme??`dark`)(`"fan out subagents"`)} and Claude sends a team. Each one digs deep so nothing gets missed.`,cooldownSessions:3,isRelevant:async()=>(Me(),!1)},{id:`guest-passes`,content:async e=>{let t=l(`claude`,e?.theme??`dark`),n=Ge();return n?`Share Work Mate and earn ${t(Ke(n))} of extra usage · ${t(`/passes`)}`:`You have free guest passes to share · ${t(`/passes`)}`},cooldownSessions:3,isRelevant:async()=>{if(F().hasVisitedPasses)return!1;let{eligible:e}=Je();return e}},{id:`overage-credit`,content:async e=>{let t=l(`claude`,e?.theme??`dark`),n=$e(),r=n?tt(n):null;return r?`${t(`${r} in extra usage, on us`)} · third-party apps · ${t(`/extra-usage`)}`:``},cooldownSessions:3,isRelevant:async()=>rt()},{id:`feedback-command`,content:async()=>`Use /feedback to help us improve!`,cooldownSessions:15,async isRelevant(){return process.env.USER_TYPE!==`ant`&&F().numStartups>5}}],wt=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 Tt(){let e=N().spinnerTipsOverride;return e?.tips?.length?e.tips.map((e,t)=>({id:`custom-tip-${t}`,content:async()=>e,cooldownSessions:0,isRelevant:async()=>!0})):[]}async function Et(e){let t=N().spinnerTipsOverride,n=Tt();if(t?.excludeDefault&&n.length>0)return n;let r=[...Ct,...wt],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]}T(),B(),Le(),Re();var Z=2e3,Q=5,Dt=3e4,$=3,Ot=new Set([4003]);function kt(e){return typeof e!=`object`||!e||!(`type`in e)?!1:typeof e.type==`string`}var At=class{constructor(e,t,n,r){i(this,`sessionId`,void 0),i(this,`orgUuid`,void 0),i(this,`getAccessToken`,void 0),i(this,`callbacks`,void 0),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`){E(`[SessionsWebSocket] Already connecting`);return}this.state=`connecting`;let e=`${Oe().BASE_API_URL.replace(`http`,`ws`)}/v1/sessions/ws/${this.sessionId}/subscribe?organization_uuid=${this.orgUuid}`;E(`[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:Ie(e),tls:U()||void 0});this.ws=n,n.addEventListener(`open`,()=>{E(`[SessionsWebSocket] Connection opened, authenticated via headers`),this.state=`connected`,this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),n.addEventListener(`message`,e=>{let t=typeof e.data==`string`?e.data:String(e.data);this.handleMessage(t)}),n.addEventListener(`error`,()=>{let e=Error(`[SessionsWebSocket] WebSocket error`);V(e),this.callbacks.onError?.(e)}),n.addEventListener(`close`,e=>{E(`[SessionsWebSocket] Closed: code=${e.code} reason=${e.reason}`),this.handleClose(e.code)}),n.addEventListener(`pong`,()=>{E(`[SessionsWebSocket] Pong received`)})}else{let{default:n}=await import(`./wrapper-K8ZapJVu.js`),r=new n(e,{headers:t,agent:ze(e),...U()});this.ws=r,r.on(`open`,()=>{E(`[SessionsWebSocket] Connection opened, authenticated via headers`),this.state=`connected`,this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),r.on(`message`,e=>{this.handleMessage(e.toString())}),r.on(`error`,e=>{V(Error(`[SessionsWebSocket] Error: ${e.message}`)),this.callbacks.onError?.(e)}),r.on(`close`,(e,t)=>{E(`[SessionsWebSocket] Closed: code=${e} reason=${t.toString()}`),this.handleClose(e)}),r.on(`pong`,()=>{E(`[SessionsWebSocket] Pong received`)})}}handleMessage(e){try{let t=ve(e);kt(t)?this.callbacks.onMessage(t):E(`[SessionsWebSocket] Ignoring message type: ${typeof t==`object`&&t&&`type`in t?String(t.type):`unknown`}`)}catch(e){V(Error(`[SessionsWebSocket] Failed to parse message: ${ye(e)}`))}}handleClose(e){if(this.stopPingInterval(),this.state===`closed`)return;this.ws=null;let t=this.state;if(this.state=`closed`,Ot.has(e)){E(`[SessionsWebSocket] Permanent close code ${e}, not reconnecting`),this.callbacks.onClose?.();return}if(e===4001){if(this.sessionNotFoundRetries++,this.sessionNotFoundRetries>$){E(`[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}`)):(E(`[SessionsWebSocket] Not reconnecting`),this.callbacks.onClose?.())}scheduleReconnect(e,t){this.callbacks.onReconnecting?.(),E(`[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{}},Dt)}stopPingInterval(){this.pingInterval&&(clearInterval(this.pingInterval),this.pingInterval=null)}sendControlResponse(e){if(!this.ws||this.state!==`connected`){V(Error(`[SessionsWebSocket] Cannot send: not connected`));return}E(`[SessionsWebSocket] Sending control response`),this.ws.send(D(e))}sendControlRequest(e){if(!this.ws||this.state!==`connected`){V(Error(`[SessionsWebSocket] Cannot send: not connected`));return}let t={type:`control_request`,request_id:ot(),request:e};E(`[SessionsWebSocket] Sending control request: ${e.subtype}`),this.ws.send(D(t))}isConnected(){return this.state===`connected`}close(){E(`[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(){E(`[SessionsWebSocket] Force reconnecting`),this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.close(),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},500)}};T(),B(),r();function jt(e){return e.type!==`control_request`&&e.type!==`control_response`&&e.type!==`control_cancel_request`}var Mt=class{constructor(e,t){i(this,`config`,void 0),i(this,`callbacks`,void 0),i(this,`websocket`,null),i(this,`pendingPermissionRequests`,new Map),this.config=e,this.callbacks=t}connect(){E(`[RemoteSessionManager] Connecting to session ${this.config.sessionId}`);let e={onMessage:e=>this.handleMessage(e),onConnected:()=>{E(`[RemoteSessionManager] Connected`),this.callbacks.onConnected?.()},onClose:()=>{E(`[RemoteSessionManager] Disconnected`),this.callbacks.onDisconnected?.()},onReconnecting:()=>{E(`[RemoteSessionManager] Reconnecting`),this.callbacks.onReconnecting?.()},onError:e=>{V(e),this.callbacks.onError?.(e)}};this.websocket=new At(this.config.sessionId,this.config.orgUuid,this.config.getAccessToken,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);E(`[RemoteSessionManager] Permission request cancelled: ${t}`),this.pendingPermissionRequests.delete(t),this.callbacks.onPermissionCancelled?.(t,n?.tool_use_id);return}if(e.type===`control_response`){E(`[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`)E(`[RemoteSessionManager] Permission request for tool: ${n.tool_name}`),this.pendingPermissionRequests.set(t,n),this.callbacks.onPermissionRequest(n,t);else{E(`[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){E(`[RemoteSessionManager] Sending message to session ${this.config.sessionId}`);let n=await Ve(this.config.sessionId,e,t);return n||V(Error(`[RemoteSessionManager] Failed to send message to session ${this.config.sessionId}`)),n}respondToPermissionRequest(e,t){if(!this.pendingPermissionRequests.get(e)){V(Error(`[RemoteSessionManager] No pending permission request with ID: ${e}`));return}this.pendingPermissionRequests.delete(e);let n={type:`control_response`,response:{subtype:`success`,request_id:e,response:{behavior:t.behavior,...t.behavior===`allow`?{updatedInput:t.updatedInput}:{message:t.message}}}};E(`[RemoteSessionManager] Sending permission response: ${t.behavior}`),this.websocket?.sendControlResponse(n)}isConnected(){return this.websocket?.isConnected()??!1}cancelSession(){E(`[RemoteSessionManager] Sending interrupt signal`),this.websocket?.sendControlRequest({subtype:`interrupt`})}getSessionId(){return this.config.sessionId}disconnect(){E(`[RemoteSessionManager] Disconnecting`),this.websocket?.close(),this.websocket=null,this.pendingPermissionRequests.clear()}reconnect(){E(`[RemoteSessionManager] Reconnecting WebSocket`),this.websocket?.reconnect()}};function Nt(e,t,n,r=!1,i=!1){return{sessionId:e,getAccessToken:t,orgUuid:n,hasInitialPrompt:r,viewerOnly:i}}export{xt as a,gt as c,J as i,ft as l,Nt as n,bt as o,Et as r,yt as s,Mt as t,pt as u};
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{n as r,t as i}from"./defineProperty-C-QyHrDq.js";import{I as a,P as o,di as s,fi as c,j as l,t as u,ui as ee}from"./src-CDCSSo0U2.js";import{t as d}from"./jsx-runtime-Bb4Xn-E0.js";import{Cg as f,Cs as p,DD as m,ED as te,Is as ne,KD as re,Nr as ie,Ol as ae,Ps as oe,Sg as se,Tg as ce,WD as h,_S as g,ax as le,bg as ue,fg as de,fr as _,gb as v,gg as y,ix as b,jr as x,kl as fe,ub as S,vS as pe,vg as me,wg as he,ys as ge}from"./loadAgentsDir-x3rlgED4.js";import{n as _e,t as C}from"./cwd-CYmmnQVS.js";import{C as ve,F as ye,S as w,a as T,l as E,w as D,z as O}from"./debug-BrXObCdR.js";import{$t as k,Xt as A,f as j,g as M,n as N}from"./settings-BeLFUeie.js";import{b as P,c as F,g as I,o as L,y as be}from"./config-DRDuVyzE.js";import{_ as R,d as xe,g as Se,h as Ce}from"./git-Do0wJvux.js";import{n as z,r as we}from"./execFileNoThrow-D244NytW.js";import{o as B,s as V}from"./log-BMCygSzM.js";import{i as H,o as Te}from"./platform-BrYefG_2.js";import{n as Ee,r as De}from"./analytics-BotDBGh0.js";import{l as Oe,u as ke}from"./oauth-BqJqV-2M.js";import{Bt as Ae,Si as je,Vt as Me,_ as Ne,g as Pe,wi as Fe}from"./model-CZViyZnE.js";import{c as Ie,h as Le,l as Re,m as U,s as ze}from"./proxy-CRN7jYIi.js";import{n as Be,o as W}from"./fileStateCache-DDW5toIs.js";import{d as Ve,o as He}from"./api-2cdIPaeq.js";import{c as Ue,u as We}from"./firstPartyEventLogger-BXY1IJ2D.js";import{a as Ge,r as Ke,s as qe,t as Je}from"./referral-CKmHHxj_.js";import{c as Ye,i as Xe}from"./terminalSetup-3JNy6i_J.js";import{n as Ze,t as Qe}from"./PermissionDialog-0ya1CU5k.js";import{n as $e,r as et,t as tt}from"./overageCreditGrant-Du3dOYVu.js";import{i as nt,o as rt}from"./OverageCreditUpsell-BM7szLgm.js";import{n as it,t as at}from"./DesktopHandoff-DaP4Riar.js";import{randomUUID as ot}from"crypto";n(),te(),_e(),I(),k(),we(),R(),B(),We();var st=[/(?:^|\/)(?: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 ct(e){return!st.some(t=>t.test(e))}function lt(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(!ct(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 ut(){if(A.platform===`win32`||!await xe())return[];try{let e=await Ue(),t=[`log`,`-n`,`1000`,`--pretty=format:`,`--name-only`,`--diff-filter=M`],n=new Map,r=e=>{for(let t of e.split(`
|
|
2
|
+
`)){let e=t.trim();e&&n.set(e,(n.get(e)??0)+1)}};if(e){let{stdout:n}=await z(`git`,[...t,`--author=${e}`],{cwd:C()});r(n)}if(n.size<10){let{stdout:e}=await z(Se(),t,{cwd:C()});r(e)}return lt(Array.from(n.entries()).sort((e,t)=>t[1]-e[1]).map(([e])=>e),5)}catch(e){return V(e),[]}}var dt=10080*60*1e3,ft=t(()=>{let e=L(),t=e.exampleFiles?.length?m(e.exampleFiles):`<filepath>`;return`Try "${m([`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...`])}"`}),pt=t(async()=>{let e=L();Date.now()-(e.exampleFilesGeneratedAt??0)>dt&&(e.exampleFiles=[]),e.exampleFiles?.length||ut().then(e=>{e.length&&be(t=>({...t,exampleFiles:e,exampleFilesGeneratedAt:Date.now()}))})});Fe();var mt={"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 ht(e){let t=e.toLowerCase(),n=je();for(let[e,r]of Object.entries(mt)){let i=r.retirementDates[n];if(!(!t.includes(e)||!i))return{isDeprecated:!0,modelName:r.modelName,retirementDate:i}}return{isDeprecated:!1}}function gt(e){if(!e)return null;let t=ht(e);return t.isDeprecated?`⚠ ${t.modelName} will be retired on ${t.retirementDate}. Consider switching to a newer model.`:null}r(),s(),O(),w(),T(),Te(),ke(),M(),Ae(),Xe(),v(),fe(),x();var G=e(c(),1);u(),Ee(),I(),le(),it(),Ze();var K=d(),_t={enable_shortcut_tip:!1,enable_startup_dialog:!1};function q(){return _t}function vt(){return process.platform===`darwin`||process.platform===`win32`&&process.arch===`x64`}function yt(){if(!vt()||!q().enable_startup_dialog)return!1;let e=F();return!(e.desktopUpsellDismissed||(e.desktopUpsellSeenCount??0)>=3)}function bt({onDone:e}){let[t,n]=(0,G.useState)(!1);if((0,G.useEffect)(()=>{let e=(F().desktopUpsellSeenCount??0)+1;P(t=>(t.desktopUpsellSeenCount??0)>=e?t:{...t,desktopUpsellSeenCount:e}),De(`tengu_desktop_upsell_shown`,{seen_count:e})},[]),t)return(0,K.jsx)(at,{onDone:()=>e()});function r(t){switch(t){case`try`:n(!0);return;case`never`:P(e=>e.desktopUpsellDismissed?e:{...e,desktopUpsellDismissed:!0}),e();return;case`not-now`:e();return}}return(0,K.jsx)(Qe,{title:`Try Claude Code Desktop`,children:(0,K.jsxs)(a,{flexDirection:`column`,paddingX:2,paddingY:1,children:[(0,K.jsx)(a,{marginBottom:1,children:(0,K.jsx)(o,{children:`Same Claude Code with visual diffs, live app preview, parallel sessions, and more.`})}),(0,K.jsx)(b,{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`)})]})})}Ne(),re(),W(),He(),pe(),me(),oe(),ge(),qe(),et(),nt(),I();function xt(e){let t=F().numStartups;P(n=>{let r=n.tipsHistory??{};return r[e]===t?n:{...n,tipsHistory:{...r,[e]:t}}})}function J(e){let t=F(),n=t.tipsHistory?.[e];return n?t.numStartups-n:1/0}u(),I(),k(),R();var Y;async function St(){return Y===void 0&&(Y=h in await ne()),Y}async function X(e,t,n){if(!await St()||p(`${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&&Be(t.readFileState).some(e=>n.filePath.test(e)))}var Ct=[{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 F().numStartups<10}},{id:`plan-mode-for-complex-tasks`,content:async()=>`Use Plan Mode to prepare for a complex request before making changes. Press ${g(`chat:cycleMode`,`Chat`,`shift+tab`)} twice to enable.`,cooldownSessions:5,isRelevant:async()=>{let e=F();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=F(),t=j(),n=!!e.lastPlanModeUse,r=!!t?.permissions?.defaultMode;return n&&!r}catch(e){return E(`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=F();return await Ce()<=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()=>!_()&&await ae()>=2},{id:`terminal-setup`,content:async()=>A.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=F();return A.terminal===`Apple_Terminal`?!e.optionAsMetaKeyInstalled:!e.shiftEnterKeyBindingInstalled}},{id:`shift-enter`,content:async()=>A.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=F();return!!((A.terminal===`Apple_Terminal`?e.optionAsMetaKeyInstalled:e.shiftEnterKeyBindingInstalled)&&e.numStartups>3)}},{id:`shift-enter-setup`,content:async()=>A.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(!Ye())return!1;let e=F();return!(A.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 F().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&&ee.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()=>H()===`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()=>j().statusLine===void 0},{id:`prompt-queue`,content:async()=>`Hit Enter to queue up additional messages while Claude is working.`,cooldownSessions:5,async isRelevant(){return F().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 '${A.terminal===`vscode`?`code`:A.terminal}' command in PATH" to enable IDE integration`,cooldownSessions:0,async isRelevant(){if(!f()||H()!==`macos`)return!1;switch(A.terminal){case`vscode`:return!await he();case`cursor`:return!await ue();case`windsurf`:return!await ce();default:return!1}}},{id:`ide-upsell-external-terminal`,content:async()=>`Connect Claude to your IDE · /ide`,cooldownSessions:4,async isRelevant(){return se()||(await y()).length!==0?!1:(await de()).length>0}},{id:`permissions`,content:async()=>`Use /permissions to pre-approve and pre-deny bash, edit, and MCP tools`,cooldownSessions:10,async isRelevant(){return F().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()=>!A.isSSH()},{id:`paste-images-mac`,content:async()=>`Paste images into Work Mate using control+v (not cmd+v!)`,cooldownSessions:10,isRelevant:async()=>H()===`macos`},{id:`double-esc`,content:async()=>`Double-tap esc to rewind the conversation to a previous point in time`,cooldownSessions:10,isRelevant:async()=>!S()},{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()=>S()},{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()&&F().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 F().numStartups>10}},{id:`shift-tab`,content:async()=>`Hit ${g(`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 ${g(`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 F().numStartups>5}},{id:`agent-flag`,content:async()=>`Use --agent <agent_name> to directly start a conversation with a subagent`,cooldownSessions:15,async isRelevant(){return F().numStartups>5}},{id:`desktop-app`,content:async()=>`Run Work Mate locally or remotely using the Claude desktop app: clau.de/desktop`,cooldownSessions:15,isRelevant:async()=>H()!==`linux`},{id:`desktop-shortcut`,content:async e=>`Continue your session in Work Mate Desktop with ${l(`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:`opusplan-mode-reminder`,content:async()=>`Your default model setting is Opus Plan Mode. Press ${g(`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=F(),t=Pe()===`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${l(`suggestion`,e?.theme??`dark`)(`/plugin install frontend-design@${h}`)}`,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${l(`suggestion`,e?.theme??`dark`)(`/plugin install vercel@${h}`)}`,cooldownSessions:3,isRelevant:async e=>X(`vercel`,e,{filePath:/(?:^|[/\\])vercel\.json$/i,cli:[`vercel`]})},{id:`subagent-fanout-nudge`,content:async e=>`Say ${l(`suggestion`,e?.theme??`dark`)(`"fan out subagents"`)} and Claude sends a team. Each one digs deep so nothing gets missed.`,cooldownSessions:3,isRelevant:async()=>(Me(),!1)},{id:`guest-passes`,content:async e=>{let t=l(`claude`,e?.theme??`dark`),n=Ge();return n?`Share Work Mate and earn ${t(Ke(n))} of extra usage · ${t(`/passes`)}`:`You have free guest passes to share · ${t(`/passes`)}`},cooldownSessions:3,isRelevant:async()=>{if(F().hasVisitedPasses)return!1;let{eligible:e}=Je();return e}},{id:`overage-credit`,content:async e=>{let t=l(`claude`,e?.theme??`dark`),n=$e(),r=n?tt(n):null;return r?`${t(`${r} in extra usage, on us`)} · third-party apps · ${t(`/extra-usage`)}`:``},cooldownSessions:3,isRelevant:async()=>rt()},{id:`feedback-command`,content:async()=>`Use /feedback to help us improve!`,cooldownSessions:15,async isRelevant(){return process.env.USER_TYPE!==`ant`&&F().numStartups>5}}],wt=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 Tt(){let e=N().spinnerTipsOverride;return e?.tips?.length?e.tips.map((e,t)=>({id:`custom-tip-${t}`,content:async()=>e,cooldownSessions:0,isRelevant:async()=>!0})):[]}async function Et(e){let t=N().spinnerTipsOverride,n=Tt();if(t?.excludeDefault&&n.length>0)return n;let r=[...Ct,...wt],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]}T(),B(),Le(),Re();var Z=2e3,Q=5,Dt=3e4,$=3,Ot=new Set([4003]);function kt(e){return typeof e!=`object`||!e||!(`type`in e)?!1:typeof e.type==`string`}var At=class{constructor(e,t,n,r){i(this,`sessionId`,void 0),i(this,`orgUuid`,void 0),i(this,`getAccessToken`,void 0),i(this,`callbacks`,void 0),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`){E(`[SessionsWebSocket] Already connecting`);return}this.state=`connecting`;let e=`${Oe().BASE_API_URL.replace(`http`,`ws`)}/v1/sessions/ws/${this.sessionId}/subscribe?organization_uuid=${this.orgUuid}`;E(`[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:Ie(e),tls:U()||void 0});this.ws=n,n.addEventListener(`open`,()=>{E(`[SessionsWebSocket] Connection opened, authenticated via headers`),this.state=`connected`,this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),n.addEventListener(`message`,e=>{let t=typeof e.data==`string`?e.data:String(e.data);this.handleMessage(t)}),n.addEventListener(`error`,()=>{let e=Error(`[SessionsWebSocket] WebSocket error`);V(e),this.callbacks.onError?.(e)}),n.addEventListener(`close`,e=>{E(`[SessionsWebSocket] Closed: code=${e.code} reason=${e.reason}`),this.handleClose(e.code)}),n.addEventListener(`pong`,()=>{E(`[SessionsWebSocket] Pong received`)})}else{let{default:n}=await import(`./wrapper-K8ZapJVu.js`),r=new n(e,{headers:t,agent:ze(e),...U()});this.ws=r,r.on(`open`,()=>{E(`[SessionsWebSocket] Connection opened, authenticated via headers`),this.state=`connected`,this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),r.on(`message`,e=>{this.handleMessage(e.toString())}),r.on(`error`,e=>{V(Error(`[SessionsWebSocket] Error: ${e.message}`)),this.callbacks.onError?.(e)}),r.on(`close`,(e,t)=>{E(`[SessionsWebSocket] Closed: code=${e} reason=${t.toString()}`),this.handleClose(e)}),r.on(`pong`,()=>{E(`[SessionsWebSocket] Pong received`)})}}handleMessage(e){try{let t=ve(e);kt(t)?this.callbacks.onMessage(t):E(`[SessionsWebSocket] Ignoring message type: ${typeof t==`object`&&t&&`type`in t?String(t.type):`unknown`}`)}catch(e){V(Error(`[SessionsWebSocket] Failed to parse message: ${ye(e)}`))}}handleClose(e){if(this.stopPingInterval(),this.state===`closed`)return;this.ws=null;let t=this.state;if(this.state=`closed`,Ot.has(e)){E(`[SessionsWebSocket] Permanent close code ${e}, not reconnecting`),this.callbacks.onClose?.();return}if(e===4001){if(this.sessionNotFoundRetries++,this.sessionNotFoundRetries>$){E(`[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}`)):(E(`[SessionsWebSocket] Not reconnecting`),this.callbacks.onClose?.())}scheduleReconnect(e,t){this.callbacks.onReconnecting?.(),E(`[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{}},Dt)}stopPingInterval(){this.pingInterval&&(clearInterval(this.pingInterval),this.pingInterval=null)}sendControlResponse(e){if(!this.ws||this.state!==`connected`){V(Error(`[SessionsWebSocket] Cannot send: not connected`));return}E(`[SessionsWebSocket] Sending control response`),this.ws.send(D(e))}sendControlRequest(e){if(!this.ws||this.state!==`connected`){V(Error(`[SessionsWebSocket] Cannot send: not connected`));return}let t={type:`control_request`,request_id:ot(),request:e};E(`[SessionsWebSocket] Sending control request: ${e.subtype}`),this.ws.send(D(t))}isConnected(){return this.state===`connected`}close(){E(`[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(){E(`[SessionsWebSocket] Force reconnecting`),this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.close(),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},500)}};T(),B(),r();function jt(e){return e.type!==`control_request`&&e.type!==`control_response`&&e.type!==`control_cancel_request`}var Mt=class{constructor(e,t){i(this,`config`,void 0),i(this,`callbacks`,void 0),i(this,`websocket`,null),i(this,`pendingPermissionRequests`,new Map),this.config=e,this.callbacks=t}connect(){E(`[RemoteSessionManager] Connecting to session ${this.config.sessionId}`);let e={onMessage:e=>this.handleMessage(e),onConnected:()=>{E(`[RemoteSessionManager] Connected`),this.callbacks.onConnected?.()},onClose:()=>{E(`[RemoteSessionManager] Disconnected`),this.callbacks.onDisconnected?.()},onReconnecting:()=>{E(`[RemoteSessionManager] Reconnecting`),this.callbacks.onReconnecting?.()},onError:e=>{V(e),this.callbacks.onError?.(e)}};this.websocket=new At(this.config.sessionId,this.config.orgUuid,this.config.getAccessToken,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);E(`[RemoteSessionManager] Permission request cancelled: ${t}`),this.pendingPermissionRequests.delete(t),this.callbacks.onPermissionCancelled?.(t,n?.tool_use_id);return}if(e.type===`control_response`){E(`[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`)E(`[RemoteSessionManager] Permission request for tool: ${n.tool_name}`),this.pendingPermissionRequests.set(t,n),this.callbacks.onPermissionRequest(n,t);else{E(`[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){E(`[RemoteSessionManager] Sending message to session ${this.config.sessionId}`);let n=await Ve(this.config.sessionId,e,t);return n||V(Error(`[RemoteSessionManager] Failed to send message to session ${this.config.sessionId}`)),n}respondToPermissionRequest(e,t){if(!this.pendingPermissionRequests.get(e)){V(Error(`[RemoteSessionManager] No pending permission request with ID: ${e}`));return}this.pendingPermissionRequests.delete(e);let n={type:`control_response`,response:{subtype:`success`,request_id:e,response:{behavior:t.behavior,...t.behavior===`allow`?{updatedInput:t.updatedInput}:{message:t.message}}}};E(`[RemoteSessionManager] Sending permission response: ${t.behavior}`),this.websocket?.sendControlResponse(n)}isConnected(){return this.websocket?.isConnected()??!1}cancelSession(){E(`[RemoteSessionManager] Sending interrupt signal`),this.websocket?.sendControlRequest({subtype:`interrupt`})}getSessionId(){return this.config.sessionId}disconnect(){E(`[RemoteSessionManager] Disconnecting`),this.websocket?.close(),this.websocket=null,this.pendingPermissionRequests.clear()}reconnect(){E(`[RemoteSessionManager] Reconnecting WebSocket`),this.websocket?.reconnect()}};function Nt(e,t,n,r=!1,i=!1){return{sessionId:e,getAccessToken:t,orgUuid:n,hasInitialPrompt:r,viewerOnly:i}}export{xt as a,gt as c,J as i,ft as l,Nt as n,bt as o,Et as r,yt as s,Mt as t,pt as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,P as r,Wt as i,dr as a,fi as o,ot as ee,t as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{en as l,vr as te}from"./state-ix0xIunV.js";import{$f as u,AC as d,Eb as f,FS as ne,Hr as re,Jn as ie,LS as ae,Nr as oe,Ny as p,PS as m,Pl as h,Py as se,XS as g,Xu as _,Yu as ce,ar as le,ep as ue,fi as de,jr as v,kC as y,kl as b,pi as x,qr as S,ti as fe,wb as C}from"./loadAgentsDir-x3rlgED4.js";import{o as w,s as T}from"./log-BMCygSzM.js";import{n as E,r as D}from"./analytics-BotDBGh0.js";import{u as O}from"./referral-CKmHHxj_.js";import{r as pe}from"./asciicast-CbAjUHT_.js";import{a as me,n as k,s as A}from"./skillChangeDetector-C65ZLSYV.js";import{a as j,i as M,n as N,o as P,r as F,t as I}from"./crossProjectResume-Bj_Pe8oe.js";import{t as L}from"./REPL-CRJB2t2z.js";import{dirname as R}from"path";var z=t(o(),1);g(),l(),P(),f(),u(),s(),O(),E(),m(),d(),M(),b(),p(),N(),w(),v();var B=c();function he(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 V({commands:t,worktreePaths:i,initialTools:o,mcpClients:s,dynamicMcpConfig:c,debug:l,mainThreadAgentDefinition:u,autoConnectIdeFlag:d,strictMcpConfig:f=!1,systemPrompt:p,appendSystemPrompt:m,initialSearchQuery:g,disableSlashCommands:v=!1,forkSession:b,taskListId:w,filterByPr:E,thinkingConfig:O,onTurnComplete:M}){let{rows:N}=ee(),P=ne(e=>e.agentDefinitions),V=ae(),[U,W]=z.useState([]),[_e,G]=z.useState(!0),[ve,ye]=z.useState(!1),[K,be]=z.useState(!1),[q,xe]=z.useState(null),[J,Se]=z.useState(null),Y=z.useRef(null),X=z.useRef(0),Z=z.useMemo(()=>{let e=U.filter(e=>!e.isSidechain);if(E!==void 0){if(E===!0)e=e.filter(e=>e.prNumber!==void 0);else if(typeof E==`number`)e=e.filter(e=>e.prNumber===E);else if(typeof E==`string`){let t=he(E);t!==null&&(e=e.filter(e=>e.prNumber===t))}}return e},[U,E]),Ce=oe();z.useEffect(()=>{S(i).then(e=>{Y.current=e,X.current=e.logs.length,W(e.logs),G(!1)}).catch(e=>{T(e),G(!1)})},[i]);let Q=z.useCallback(e=>{let t=Y.current;!t||t.nextIndex>=t.allStatLogs.length||le(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)})},[]),$=z.useCallback(e=>{G(!0),(e?re():S(i)).then(e=>{Y.current=e,X.current=e.logs.length,W(e.logs)}).catch(e=>{T(e)}).finally(()=>{G(!1)})},[i]),we=z.useCallback(()=>{let e=!K;be(e),$(e)},[K,$]);function Te(){process.exit(1)}async function Ee(t){ye(!0);let n=performance.now(),r=I(t,K,i);if(r.isCrossProject&&!r.isSameRepoWorktree){let e=r.command,t=await a(e);t&&process.stdout.write(t),Se(e);return}try{let r=await se(t,void 0);if(!r)throw Error(`Failed to load conversation`);r.sessionId&&!b?(te(y(r.sessionId),t.fullPath?R(t.fullPath):null),await pe(),await de(),ue(r.sessionId)):b&&r.contentReplacements?.length&&await fe(r.contentReplacements);let{agentDefinition:i}=me(r.agentSetting,u,P);V(e=>({...e,agent:i?.agentType}));let a=k(r.agentName,r.agentColor);if(a&&V(e=>({...e,standaloneAgentContext:a})),h(r.agentName),x(b?{...r,worktreeSession:void 0}:r),b||(A(r.worktreeSession),r.sessionId&&ie()),r.goal&&r.sessionId){let{hydrateGoalFromTranscript:t}=(_(),e(ce)),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([]),xe({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}),T(e),e}}return J?(0,B.jsx)(ge,{command:J}):q?(0,B.jsx)(L,{debug:l,commands:t,initialTools:o,initialMessages:q.messages,initialFileHistorySnapshots:q.fileHistorySnapshots,initialContentReplacements:q.contentReplacements,initialAgentName:q.agentName,initialAgentColor:q.agentColor,mcpClients:s,dynamicMcpConfig:c,strictMcpConfig:f,systemPrompt:p,appendSystemPrompt:m,mainThreadAgentDefinition:q.mainThreadAgentDefinition,autoConnectIdeFlag:d,disableSlashCommands:v,taskListId:w,thinkingConfig:O,onTurnComplete:M}):_e?(0,B.jsxs)(n,{children:[(0,B.jsx)(C,{}),(0,B.jsx)(r,{children:` Loading conversations…`})]}):ve?(0,B.jsxs)(n,{children:[(0,B.jsx)(C,{}),(0,B.jsx)(r,{children:` Resuming conversation…`})]}):Z.length===0?(0,B.jsx)(H,{}):(0,B.jsx)(j,{logs:Z,maxHeight:N,onCancel:Te,onSelect:Ee,onLogsChanged:Ce?()=>$(K):void 0,onLoadMore:Q,initialSearchQuery:g,showAllProjects:K,onToggleAllProjects:we,onAgenticSearch:F})}function H(){return i(`app:interrupt`,()=>{process.exit(1)},{context:`Global`}),(0,B.jsxs)(n,{flexDirection:`column`,children:[(0,B.jsx)(r,{children:`No conversations found to resume.`}),(0,B.jsx)(r,{dimColor:!0,children:`Press Ctrl+C to exit and start a new conversation.`})]})}function ge({command:e}){return z.useEffect(()=>{let e=setTimeout(()=>{process.exit(0)},100);return()=>clearTimeout(e)},[]),(0,B.jsxs)(n,{flexDirection:`column`,gap:1,children:[(0,B.jsx)(r,{children:`This conversation is from a different directory.`}),(0,B.jsxs)(n,{flexDirection:`column`,children:[(0,B.jsx)(r,{children:`To resume, run:`}),(0,B.jsxs)(r,{children:[` `,e]})]}),(0,B.jsx)(r,{dimColor:!0,children:`(Command copied to clipboard)`})]})}export{V as ResumeConversation};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{n as r,t as i}from"./axios-DaWTGg7G.js";import{C as a,F as o,S as s,a as c,l,w as u,z as d}from"./debug-BrXObCdR.js";import{M as f,j as p}from"./git-Do0wJvux.js";import{_n as m,ar as h,or as g,vn as _}from"./model-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{n as r,t as i}from"./axios-DaWTGg7G.js";import{C as a,F as o,S as s,a as c,l,w as u,z as d}from"./debug-BrXObCdR.js";import{M as f,j as p}from"./git-Do0wJvux.js";import{_n as m,ar as h,or as g,vn as _}from"./model-CZViyZnE.js";import{E as v,O as y,n as b,t as x}from"./rcDebugLog-DBB9r8aw.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(),c(),x(),p(),d(),y(),m(),s(),g(),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,`url`,void 0),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}`),l(`SSETransport: Liveness timeout, reconnecting`,{level:`error`}),f(`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),l(`SSETransport: SSE URL = ${e.href}`),l(`SSETransport: POST URL = ${this.postUrl}`),f(`info`,`cli_sse_transport_initialized`)}getLastSequenceNum(){return this.lastSequenceNum}async connect(){if(this.state!==`idle`&&this.state!==`reconnecting`){l(`SSETransport: Cannot connect, current state is ${this.state}`,{level:`error`}),f(`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":h()};n.Cookie&&delete r.Authorization,this.lastSequenceNum>0&&(r[`Last-Event-ID`]=String(this.lastSequenceNum)),l(`SSETransport: Opening ${t.href}`),f(`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(l(`SSETransport: HTTP ${n.status}${e?` (permanent)`:``}`,{level:`error`}),f(`error`,`cli_sse_connect_http_error`,{status:n.status}),e){this.state=`closed`,this.onCloseCallback?.(n.status);return}this.handleConnectionError();return}if(!n.body){l(`SSETransport: No response body`),this.handleConnectionError();return}let i=Date.now()-e;l(`SSETransport: Connected`),f(`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;l(`SSETransport: Connection error: ${o(e)}`,{level:`error`}),f(`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){l(`SSETransport: Buffer exceeded ${i} bytes — dropping connection`,{level:`error`}),f(`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))l(`SSETransport: DUPLICATE frame seq=${t} (lastSequenceNum=${this.lastSequenceNum}, seenCount=${this.seenSequenceNums.size})`,{level:`warn`}),f(`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&&(l(`SSETransport: Frame has data: but no event: field — dropped`,{level:`warn`}),f(`warn`,`cli_sse_frame_missing_event_field`))}}}catch(e){if(this.abortController?.signal.aborted)return;l(`SSETransport: Stream read error: ${o(e)}`,{level:`error`}),f(`error`,`cli_sse_stream_read_error`)}finally{t.releaseLock()}this.state!==`closing`&&this.state!==`closed`&&(l(`SSETransport: Stream ended, reconnecting`),this.handleConnectionError())}handleSSEFrame(e,t){if(e!==`client_event`){l(`SSETransport: Unexpected SSE event type '${e}' on worker stream`,{level:`warn`}),f(`warn`,`cli_sse_unexpected_event_type`,{event_type:e});return}let n;try{n=a(t)}catch(e){l(`SSETransport: Failed to parse client_event data: ${o(e)}`,{level:`error`});return}let r=n.payload;if(r&&typeof r==`object`&&`type`in r){let e=this.sessionId?` session=${this.sessionId}`:``;l(`SSETransport: Event seq=${n.sequence_num} event_id=${n.event_id} event_type=${n.event_type} payload_type=${String(r.type)}${e}`),f(`info`,`cli_sse_message_received`),this.onData?.(u(r)+`
|
|
4
4
|
`)}else l(`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),l(`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));l(`SSETransport: Reconnecting in ${Math.round(n)}ms (attempt ${this.reconnectAttempts}, ${Math.round(t/1e3)}s elapsed)`),f(`error`,`cli_sse_reconnect_attempt`,{reconnectAttempts:this.reconnectAttempts}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}else l(`SSETransport: Reconnection time budget exhausted after ${Math.round(t/1e3)}s`,{level:`error`}),f(`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){l(`SSETransport: No session token available for POST`),f(`warn`,`cli_sse_post_no_token`);return}let n={...t,"Content-Type":`application/json`,"anthropic-version":`2023-06-01`,"User-Agent":h()};l(`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){l(`SSETransport: POST success type=${e.type}`);return}if(l(`SSETransport: POST ${i.status} body=${u(i.data).slice(0,200)}`),i.status>=400&&i.status<500&&i.status!==429){l(`SSETransport: POST returned ${i.status} (client error), not retrying`),f(`warn`,`cli_sse_post_client_error`,{status:i.status});return}l(`SSETransport: POST returned ${i.status}, attempt ${t}/${A}`),f(`warn`,`cli_sse_post_retryable_error`,{status:i.status,attempt:t})}catch(e){l(`SSETransport: POST error: ${e.message}, attempt ${t}/${A}`),f(`warn`,`cli_sse_post_network_error`,{attempt:t})}if(t===A){l(`SSETransport: POST failed after ${A} attempts, continuing`),f(`warn`,`cli_sse_post_retries_exhausted`);return}await _(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{JT as e,YT as t}from"./loadAgentsDir-x3rlgED4.js";t();export{e as clearSearchExtraToolsDescriptionCache};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,n as t,o as n}from"./rolldown-runtime-DaDcL9Zw.js";import{d as r,l as i,o as a}from"./envUtils-DSxRz_kt.js";import{n as o,t as s}from"./figures-5ThXQEtq.js";import{D as c,Gt as l,H as u,I as d,P as f,T as p,U as ee,Wt as te,Xn as ne,a as re,d as ie,di as m,fi as h,k as ae,n as oe,ot as se,r as ce,t as g,ui as _,x as v,y as le}from"./src-CDCSSo0U2.js";import{t as y}from"./jsx-runtime-Bb4Xn-E0.js";import{en as b,gr as ue,ht as x,qt as de}from"./state-ix0xIunV.js";import{$f as S,$m as fe,$o as C,AE as pe,C as me,Ex as he,F as ge,FS as w,IS as _e,LS as ve,ME as T,Nx as ye,OE as be,PS as xe,Px as Se,Qd as Ce,Qm as E,Qo as we,S as Te,Sg as Ee,Tx as D,XS as O,Xf as k,Zd as De,Zo as A,_g as Oe,ax as ke,fx as j,ix as Ae,jE as je,jr as Me,mr as Ne,px as M,rx as N,v as Pe,vg as Fe}from"./loadAgentsDir-x3rlgED4.js";import{n as Ie,t as Le}from"./cwd-CYmmnQVS.js";import{S as Re,w as ze}from"./debug-BrXObCdR.js";import{Bt as Be,Lt as Ve,Vt as He,Wt as Ue,c as We,g as P,n as Ge,x as F,zt as Ke}from"./settings-BeLFUeie.js";import{a as qe,b as I,c as L,g as Je,i as Ye,m as Xe,o as Ze}from"./config-DRDuVyzE.js";import{o as R,s as Qe}from"./log-BMCygSzM.js";import{n as $e,r as z}from"./analytics-BotDBGh0.js";import{b as et,g as tt}from"./startupProfiler-xa3NmN7Z.js";import{r as nt}from"./permissions-Cn_6f8CB.js";import{Bt as rt,Ft as it,G as at,K as ot,Tr as st,_ as ct,b as lt,et as ut,it as dt,q as ft,rt as pt,tt as mt,wr as B,x as ht}from"./model-CZViyZnE.js";import{r as gt,t as _t}from"./poorMode-CBOtooa0.js";import{u as vt}from"./referral-CKmHHxj_.js";import{i as yt,r as bt}from"./bridgeEnabled-Cc0mGlTb.js";import{a as V,c as H,d as U,i as xt,l as St,n as Ct,o as wt,r as Tt,s as Et,t as Dt,u as W}from"./status-D4IQpsNK.js";import{n as Ot,t as kt}from"./useExitOnCtrlCDWithKeybindings-BwsZ5f0s.js";import{i as At,n as G,r as jt}from"./modalContext-DFjKLCB6.js";import{n as Mt,t as Nt}from"./ThemePicker-CVSRqTzW.js";import{i as Pt,n as Ft,r as It,t as Lt}from"./extraUsage-CpgRTcMk.js";import{n as Rt,t as zt}from"./ClaudeMdExternalIncludesDialog-BZSyRqeq.js";import{t as Bt}from"./SearchBox-vfLXEPed.js";import{n as Vt,t as Ht}from"./useSearchInput-C5OzQnX6.js";import{n as Ut,t as Wt}from"./usage-BxVeUt60.js";import{a as Gt,i as Kt,t as qt}from"./OverageCreditUpsell-BM7szLgm.js";function Jt(){let e=x();return[{label:`Version`,value:`0.0.7`},{label:`Session name`,value:Ne(e)??(0,K.jsx)(f,{dimColor:!0,children:`/rename to add a name`})},{label:`Session ID`,value:e},{label:`cwd`,value:Le()},...Ct(),...Dt()]}function Yt({mainLoopModel:e,mcp:t,theme:n,context:r}){return[{label:`Model`,value:W(e)},...Tt(t.clients,r.options.ideInstallationStatus,n),...wt(t.clients,n),...H(),...St()]}async function Xt(){return[...await xt(),...await V(),...await Et()]}function Zt({value:e}){return Array.isArray(e)?(0,K.jsx)(d,{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 Qt({context:e,diagnosticsPromise:t}){let n=w(e=>e.mainLoopModel),r=w(e=>e.mcp),[i]=u(),a=en.useMemo(()=>[Jt(),Yt({mainLoopModel:n,mcp:r,theme:i,context:e})],[n,r,i,e]),o=jt()?1:void 0;return(0,K.jsxs)(d,{flexDirection:`column`,flexGrow:o,children:[(0,K.jsxs)(d,{flexDirection:`column`,gap:1,flexGrow:o,children:[a.map((e,t)=>e.length>0&&(0,K.jsx)(d,{flexDirection:`column`,children:e.map(({label:e,value:t},n)=>(0,K.jsxs)(d,{flexDirection:`row`,gap:1,flexShrink:0,children:[e!==void 0&&(0,K.jsxs)(f,{bold:!0,children:[e,`:`]}),(0,K.jsx)(Zt,{value:t})]},n))},t)),(0,K.jsx)(tn.Suspense,{fallback:null,children:(0,K.jsx)($t,{promise:t})})]}),(0,K.jsx)(f,{dimColor:!0,children:(0,K.jsx)(j,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})})]})}function $t({promise:e}){let t=(0,tn.use)(e);return t.length===0?null:(0,K.jsxs)(d,{flexDirection:`column`,paddingBottom:1,children:[(0,K.jsx)(f,{bold:!0,children:`System Diagnostics`}),t.map((e,t)=>(0,K.jsxs)(d,{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 en,tn,K,nn=t((()=>{o(),en=n(h(),1),tn=n(h(),1),b(),G(),g(),xe(),Ie(),Me(),U(),M(),K=y()}));function rn({currentVersion:e,onChoice:t}){function n(e){t(e)}function r(){t(`cancel`)}return(0,an.jsxs)(le,{title:`Switch to Stable Channel`,onCancel:r,color:`permission`,hideBorder:!0,hideInputGuide:!0,children:[(0,an.jsxs)(f,{children:[`The stable channel may have an older version than what you're currently running (`,e,`).`]}),(0,an.jsx)(f,{dimColor:!0,children:`How would you like to handle this?`}),(0,an.jsx)(Ae,{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 an,on=t((()=>{h(),g(),N(),an=y()}));function sn(e){return Object.entries(e).map(([e,t])=>({label:t?.name??un,value:e,description:t?.description??dn}))}function cn({initialStyle:e,onComplete:t,onCancel:n,isStandaloneCommand:r}){let[i,a]=(0,ln.useState)([]),[o,s]=(0,ln.useState)(!0);(0,ln.useEffect)(()=>{we(Le()).then(e=>{let t=sn(e);a(t),s(!1)}).catch(()=>{let e=sn(A);a(e),s(!1)})},[]);let c=(0,ln.useCallback)(e=>{t(e)},[t]);return(0,q.jsx)(le,{title:`Preferred output style`,onCancel:n,hideInputGuide:!r,hideBorder:!r,children:(0,q.jsxs)(d,{flexDirection:`column`,gap:1,children:[(0,q.jsx)(d,{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)(Ae,{options:i,onChange:c,visibleOptionCount:10,defaultValue:e})]})})}var ln,q,un,dn,fn=t((()=>{h(),ln=n(h(),1),C(),g(),Ie(),ke(),q=y(),un=`Default`,dn=`Claude completes coding tasks efficiently and provides concise responses`}));function pn({initialLanguage:e,onComplete:t,onCancel:n}){let[r,i]=(0,mn.useState)(e),[a,o]=(0,mn.useState)((e??``).length);te(`confirm:no`,n,{context:`Settings`});function c(){let e=r?.trim();t(e||void 0)}return(0,J.jsxs)(d,{flexDirection:`column`,gap:1,children:[(0,J.jsx)(f,{children:`Enter your preferred response and voice language:`}),(0,J.jsxs)(d,{flexDirection:`row`,gap:1,children:[(0,J.jsx)(f,{children:s.pointer}),(0,J.jsx)(D,{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 mn,J,hn=t((()=>{o(),mn=n(h(),1),g(),vt(),he(),J=y()}));function gn({onClose:t,context:n,setTabsHidden:a,onIsSearchModeChange:o,contentHeight:ie}){let{headerFocused:m,focusHeader:h}=re(),oe=jt(),[,ce]=u(),g=ee(),[v,y]=(0,X.useState)(L()),b=Y.useRef(L()),[x,S]=(0,X.useState)(Ge()),fe=Y.useRef(Ge()),[C,me]=(0,X.useState)(x?.outputStyle||`default`),he=Y.useRef(C),[T,ye]=(0,X.useState)(x?.language),xe=Y.useRef(T),[E,we]=(0,X.useState)(0),[D,O]=(0,X.useState)(0),[k,A]=(0,X.useState)(!1),ke=ne(),{rows:Me}=se(),Ne=ie??Math.min(Math.floor(Me*.8),30),M=Math.max(5,Ne-10),N=w(e=>e.mainLoopModel),Fe=w(e=>e.verbose),Ie=w(e=>e.thinkingEnabled),Le=w(e=>pt()?e.fastMode:!1);w(e=>e.promptSuggestionEnabled);let Re=Be(x?.permissions?.defaultMode??`default`),ze=Te()||Pe()===`enabled`,Ve=(Ce(),e(De)).isBriefEntitled(),P=ve(),[Je,R]=(0,X.useState)({}),$e=Y.useRef(Ie),[et]=(0,X.useState)(()=>We(`localSettings`)),[tt]=(0,X.useState)(()=>We(`userSettings`)),rt=Y.useRef(g),it=_e(),[ct]=(0,X.useState)(()=>{let e=it.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}}),[ut]=(0,X.useState)(()=>de()),B=Y.useRef(!1),[vt,bt]=(0,X.useState)(!1),[V,H]=(0,X.useState)(null),{query:U,setQuery:xt,cursorOffset:St}=Vt({isActive:k&&V===null&&!m,onExit:()=>A(!1),onExitUp:h,passthroughCtrlKeys:[`c`,`d`]}),Ct=k&&!m;Y.useEffect(()=>{o?.(Ct)},[Ct,o]);let wt=Oe(n.options.mcpClients),Tt=!i(process.env.CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING),Et=Y.use(pe(!0)),Dt=je(Et),W=qe();function Ot(e){z(`tengu_config_model_changed`,{from_model:N,to_model:e}),P(t=>({...t,mainLoopModel:e,mainLoopModelForSession:null})),R(t=>{let n=ht(e)+(Ft(e,!1,lt())?` · Billed as extra usage`:``);if(`model`in t){let{model:e,...r}=t;return{...r,model:n}}return{...t,model:n}})}function kt(e){I(t=>({...t,verbose:e})),y({...L(),verbose:e}),P(t=>({...t,verbose:e})),R(t=>{if(`verbose`in t){let{verbose:e,...n}=t;return n}return{...t,verbose:e}})}let At=[{id:`autoCompactEnabled`,label:`Auto-compact`,value:v.autoCompactEnabled,type:`boolean`,onChange(e){I(t=>({...t,autoCompactEnabled:e})),y({...L(),autoCompactEnabled:e}),z(`tengu_auto_compact_setting_changed`,{enabled:e})}},{id:`spinnerTipsEnabled`,label:`Show tips`,value:x?.spinnerTipsEnabled??!0,type:`boolean`,onChange(e){F(`localSettings`,{spinnerTipsEnabled:e}),S(t=>({...t,spinnerTipsEnabled:e})),z(`tengu_tips_setting_changed`,{enabled:e})}},{id:`cacheWarningEnabled`,label:`Cache warnings`,value:x?.cacheWarningEnabled??!0,type:`boolean`,onChange(e){F(`localSettings`,{cacheWarningEnabled:e}),S(t=>({...t,cacheWarningEnabled:e})),z(`tengu_cache_warning_setting_changed`,{enabled:e})}},{id:`prefersReducedMotion`,label:`Reduce motion`,value:x?.prefersReducedMotion??!1,type:`boolean`,onChange(e){F(`localSettings`,{prefersReducedMotion:e}),S(t=>({...t,prefersReducedMotion:e})),P(t=>({...t,settings:{...t.settings,prefersReducedMotion:e}})),z(`tengu_reduce_motion_setting_changed`,{enabled:e})}},{id:`thinkingEnabled`,label:`Thinking mode`,value:Ie??!0,type:`boolean`,onChange(e){P(t=>({...t,thinkingEnabled:e})),F(`userSettings`,{alwaysThinkingEnabled:e?void 0:!1}),z(`tengu_thinking_toggled`,{enabled:e})}},...pt()&&mt()?[{id:`fastMode`,label:`Fast mode (${at} only)`,value:!!Le,type:`boolean`,onChange(e){ot(),F(`userSettings`,{fastMode:e?!0:void 0}),e?(P(e=>({...e,mainLoopModel:ft(),mainLoopModelForSession:null,fastMode:!0})),R(e=>({...e,model:ft(),"Fast mode":`ON`}))):(P(e=>({...e,fastMode:!1})),R(e=>({...e,"Fast mode":`OFF`})))}}]:[],{id:`poorMode`,label:`Poor mode (save tokens)`,value:(_t(),e(gt)).isPoorModeActive(),type:`boolean`,onChange(t){(_t(),e(gt)).setPoorMode(t),P(e=>({...e,promptSuggestionEnabled:!t}))}},...process.env.USER_TYPE===`ant`?[{id:`speculationEnabled`,label:`Speculative execution`,value:v.speculationEnabled??!0,type:`boolean`,onChange(e){I(t=>t.speculationEnabled===e?t:{...t,speculationEnabled:e}),y({...L(),speculationEnabled:e}),z(`tengu_speculation_setting_changed`,{enabled:e})}}]:[],...Tt?[{id:`fileCheckpointingEnabled`,label:`Rewind code (checkpoints)`,value:v.fileCheckpointingEnabled,type:`boolean`,onChange(e){I(t=>({...t,fileCheckpointingEnabled:e})),y({...L(),fileCheckpointingEnabled:e}),z(`tengu_file_history_snapshots_setting_changed`,{enabled:e})}}]:[],{id:`verbose`,label:`Verbose output`,value:Fe,type:`boolean`,onChange:kt},{id:`terminalProgressBarEnabled`,label:`Terminal progress bar`,value:v.terminalProgressBarEnabled,type:`boolean`,onChange(e){I(t=>({...t,terminalProgressBarEnabled:e})),y({...L(),terminalProgressBarEnabled:e}),z(`tengu_terminal_progress_bar_setting_changed`,{enabled:e})}},{id:`showTurnDuration`,label:`Show turn duration`,value:v.showTurnDuration,type:`boolean`,onChange(e){I(t=>({...t,showTurnDuration:e})),y({...L(),showTurnDuration:e}),z(`tengu_show_turn_duration_setting_changed`,{enabled:e})}},{id:`defaultPermissionMode`,label:`Default permission mode`,value:Re,options:(()=>{let e=[`default`,`plan`];return[...e,...nt.filter(t=>!e.includes(t))]})(),type:`enum`,onChange(e){let t=Be(e),n=t===`auto`?t:Ke(t)?Ue(t):t,r=F(`userSettings`,{permissions:{...x?.permissions,defaultMode:n}});if(r.error){Qe(r.error);return}S(e=>({...e,permissions:{...e?.permissions,defaultMode:n}})),R(t=>({...t,defaultPermissionMode:e})),z(`tengu_config_changed`,{setting:`defaultPermissionMode`,value:e})}},...ze?[{id:`useAutoModeDuringPlan`,label:`Use auto mode during plan`,value:x?.useAutoModeDuringPlan??!0,type:`boolean`,onChange(e){F(`userSettings`,{useAutoModeDuringPlan:e}),S(t=>({...t,useAutoModeDuringPlan:e})),P(e=>{let t=ge(e.toolPermissionContext);return t===e.toolPermissionContext?e:{...e,toolPermissionContext:t}}),R(t=>({...t,"Use auto mode during plan":e}))}}]:[],{id:`respectGitignore`,label:`Respect .gitignore in file picker`,value:v.respectGitignore,type:`boolean`,onChange(e){I(t=>({...t,respectGitignore:e})),y({...L(),respectGitignore:e}),z(`tengu_respect_gitignore_setting_changed`,{enabled:e})}},...Se()?[{id:`copyOnSelect`,label:`Copy on select`,value:v.copyOnSelect??!0,type:`boolean`,onChange(e){I(t=>({...t,copyOnSelect:e})),y({...L(),copyOnSelect:e}),z(`tengu_config_changed`,{setting:`copyOnSelect`,value:String(e)})}}]:[],W?{id:`autoUpdatesChannel`,label:`Auto-update channel`,value:`disabled`,type:`managedEnum`,onChange(){}}:{id:`autoUpdatesChannel`,label:`Auto-update channel`,value:x?.autoUpdatesChannel??`latest`,type:`managedEnum`,onChange(){}},{id:`theme`,label:`Theme`,value:g,type:`managedEnum`,onChange:ce},{id:`notifChannel`,label:`Local notifications`,value:v.preferredNotifChannel,options:[`auto`,`iterm2`,`terminal_bell`,`iterm2_with_bell`,`kitty`,`ghostty`,`notifications_disabled`],type:`enum`,onChange(e){I(t=>({...t,preferredNotifChannel:e})),y({...L(),preferredNotifChannel:e})}},{id:`taskCompleteNotifEnabled`,label:`Push when idle`,value:v.taskCompleteNotifEnabled??!1,type:`boolean`,onChange(e){I(t=>({...t,taskCompleteNotifEnabled:e})),y({...L(),taskCompleteNotifEnabled:e})}},{id:`inputNeededNotifEnabled`,label:`Push when input needed`,value:v.inputNeededNotifEnabled??!1,type:`boolean`,onChange(e){I(t=>({...t,inputNeededNotifEnabled:e})),y({...L(),inputNeededNotifEnabled:e})}},{id:`agentPushNotifEnabled`,label:`Push when Claude decides`,value:v.agentPushNotifEnabled??!1,type:`boolean`,onChange(e){I(t=>({...t,agentPushNotifEnabled:e})),y({...L(),agentPushNotifEnabled:e})}},{id:`outputStyle`,label:`Output style`,value:C,type:`managedEnum`,onChange:()=>{}},...Ve?[{id:`defaultView`,label:`What you see by default`,value:x?.defaultView===void 0?`default`:String(x.defaultView),options:[`transcript`,`chat`,`default`],type:`enum`,onChange(e){let t=e==="default"?void 0:e;F(`localSettings`,{defaultView:t}),S(e=>({...e,defaultView:t}));let n=t===`chat`;P(e=>e.isBriefOnly===n?e:{...e,isBriefOnly:n}),ue(n),R(t=>({...t,"Default view":e})),z(`tengu_default_view_setting_changed`,{value:t??`unset`})}}]:[],{id:`language`,label:`Language`,value:T??`Default (English)`,type:`managedEnum`,onChange:()=>{}},{id:`editorMode`,label:`Editor mode`,value:v.editorMode===`emacs`?`normal`:v.editorMode||`normal`,options:[`normal`,`vim`],type:`enum`,onChange(e){I(t=>({...t,editorMode:e})),y({...L(),editorMode:e}),z(`tengu_editor_mode_changed`,{mode:e,source:`config_panel`})}},{id:`prStatusFooterEnabled`,label:`Show PR status footer`,value:v.prStatusFooterEnabled??!0,type:`boolean`,onChange(e){I(t=>t.prStatusFooterEnabled===e?t:{...t,prStatusFooterEnabled:e}),y({...L(),prStatusFooterEnabled:e}),z(`tengu_pr_status_footer_setting_changed`,{enabled:e})}},{id:`model`,label:`Model`,value:N===null?`Default (recommended)`:N,type:`managedEnum`,onChange:Ot},...wt?[{id:`diffTool`,label:`Diff tool`,value:v.diffTool??`auto`,options:[`terminal`,`auto`],type:`enum`,onChange(e){I(t=>({...t,diffTool:e})),y({...L(),diffTool:e}),z(`tengu_diff_tool_changed`,{tool:e,source:`config_panel`})}}]:[],...Ee()?[]:[{id:`autoConnectIde`,label:`Auto-connect to IDE (external terminal)`,value:v.autoConnectIde??!1,type:`boolean`,onChange(e){I(t=>({...t,autoConnectIde:e})),y({...L(),autoConnectIde:e}),z(`tengu_auto_connect_ide_changed`,{enabled:e,source:`config_panel`})}}],...Ee()?[{id:`autoInstallIdeExtension`,label:`Auto-install IDE extension`,value:v.autoInstallIdeExtension??!0,type:`boolean`,onChange(e){I(t=>({...t,autoInstallIdeExtension:e})),y({...L(),autoInstallIdeExtension:e}),z(`tengu_auto_install_ide_extension_changed`,{enabled:e,source:`config_panel`})}}]:[],...yt()?[{id:`remoteControlAtStartup`,label:`Enable Remote Control for all sessions`,value:v.remoteControlAtStartup===void 0?`default`:String(v.remoteControlAtStartup),options:[`true`,`false`,`default`],type:`enum`,onChange(e){if(e==="default")I(e=>{if(e.remoteControlAtStartup===void 0)return e;let t={...e};return delete t.remoteControlAtStartup,t}),y({...L(),remoteControlAtStartup:void 0});else{let t=e===`true`;I(e=>e.remoteControlAtStartup===t?e:{...e,remoteControlAtStartup:t}),y({...L(),remoteControlAtStartup:t})}let t=Xe();P(e=>e.replBridgeEnabled===t&&!e.replBridgeOutboundOnly?e:{...e,replBridgeEnabled:t,replBridgeOutboundOnly:!1})}}]:[],...Dt?[{id:`showExternalIncludesDialog`,label:`External CLAUDE.md includes`,value:Ze().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:st(process.env.ANTHROPIC_API_KEY)})]}),searchText:`Use custom API key`,value:!!(process.env.ANTHROPIC_API_KEY&&v.customApiKeyResponses?.approved?.includes(st(process.env.ANTHROPIC_API_KEY))),type:`boolean`,onChange(e){I(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=st(process.env.ANTHROPIC_API_KEY);e?n.customApiKeyResponses={...n.customApiKeyResponses,approved:[...(n.customApiKeyResponses.approved??[]).filter(e=>e!==t),t],rejected:(n.customApiKeyResponses.rejected??[]).filter(e=>e!==t)}:n.customApiKeyResponses={...n.customApiKeyResponses,approved:(n.customApiKeyResponses.approved??[]).filter(e=>e!==t),rejected:[...(n.customApiKeyResponses.rejected??[]).filter(e=>e!==t),t]}}return n}),y(L())}}]:[]],G=Y.useMemo(()=>{if(!U)return At;let e=U.toLowerCase();return At.filter(t=>t.id.toLowerCase().includes(e)?!0:(`searchText`in t?t.searchText:t.label).toLowerCase().includes(e))},[At,U]);Y.useEffect(()=>{if(E>=G.length){let e=Math.max(0,G.length-1);we(e),O(Math.max(0,e-M+1));return}O(e=>E<e?E:E>=e+M?E-M+1:e)},[G.length,E,M]);let Mt=(0,X.useCallback)(e=>{O(t=>e<t?e:e>=t+M?e-M+1:t)},[M]),Pt=(0,X.useCallback)(()=>{if(V!==null)return;let e=Object.entries(Je).map(([e,t])=>(z(`tengu_config_changed`,{key:e,value:t}),`Set ${e} to ${_.bold(t)}`)),n=r()?void 0:process.env.ANTHROPIC_API_KEY,i=!!(n&&b.current.customApiKeyResponses?.approved?.includes(st(n))),a=!!(n&&v.customApiKeyResponses?.approved?.includes(st(n)));if(i!==a&&(e.push(`${a?`Enabled`:`Disabled`} custom API key`),z(`tengu_config_changed`,{key:`env.ANTHROPIC_API_KEY`,value:a})),v.theme!==b.current.theme&&e.push(`Set theme to ${_.bold(v.theme)}`),v.preferredNotifChannel!==b.current.preferredNotifChannel&&e.push(`Set notifications to ${_.bold(v.preferredNotifChannel)}`),C!==he.current&&e.push(`Set output style to ${_.bold(C)}`),T!==xe.current&&e.push(`Set response language to ${_.bold(T??`Default (English)`)}`),v.editorMode!==b.current.editorMode&&e.push(`Set editor mode to ${_.bold(v.editorMode||`emacs`)}`),v.diffTool!==b.current.diffTool&&e.push(`Set diff tool to ${_.bold(v.diffTool)}`),v.autoConnectIde!==b.current.autoConnectIde&&e.push(`${v.autoConnectIde?`Enabled`:`Disabled`} auto-connect to IDE`),v.autoInstallIdeExtension!==b.current.autoInstallIdeExtension&&e.push(`${v.autoInstallIdeExtension?`Enabled`:`Disabled`} auto-install IDE extension`),v.autoCompactEnabled!==b.current.autoCompactEnabled&&e.push(`${v.autoCompactEnabled?`Enabled`:`Disabled`} auto-compact`),v.respectGitignore!==b.current.respectGitignore&&e.push(`${v.respectGitignore?`Enabled`:`Disabled`} respect .gitignore in file picker`),v.copyOnSelect!==b.current.copyOnSelect&&e.push(`${v.copyOnSelect?`Enabled`:`Disabled`} copy on select`),v.terminalProgressBarEnabled!==b.current.terminalProgressBarEnabled&&e.push(`${v.terminalProgressBarEnabled?`Enabled`:`Disabled`} terminal progress bar`),v.showStatusInTerminalTab!==b.current.showStatusInTerminalTab&&e.push(`${v.showStatusInTerminalTab?`Enabled`:`Disabled`} terminal tab status`),v.showTurnDuration!==b.current.showTurnDuration&&e.push(`${v.showTurnDuration?`Enabled`:`Disabled`} turn duration`),v.remoteControlAtStartup!==b.current.remoteControlAtStartup){let t=v.remoteControlAtStartup===void 0?`Reset Remote Control to default`:`${v.remoteControlAtStartup?`Enabled`:`Disabled`} Remote Control for all sessions`;e.push(t)}x?.autoUpdatesChannel!==fe.current?.autoUpdatesChannel&&e.push(`Set auto-update channel to ${_.bold(x?.autoUpdatesChannel??`latest`)}`),e.length>0?t(e.join(`
|
|
2
|
+
`)):t(`Config dialog dismissed`,{display:`system`})},[V,Je,v,N,C,T,x?.autoUpdatesChannel,pt()?x?.fastMode:void 0,t]),Lt=(0,X.useCallback)(()=>{g!==rt.current&&ce(rt.current),I(()=>b.current);let e=et;F(`localSettings`,{spinnerTipsEnabled:e?.spinnerTipsEnabled,prefersReducedMotion:e?.prefersReducedMotion,defaultView:e?.defaultView,outputStyle:e?.outputStyle});let t=tt;F(`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=ct;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:ge(e.toolPermissionContext)})),de()!==ut&&ue(ut)},[g,ce,et,tt,ct,ut,P]);te(`confirm:no`,(0,X.useCallback)(()=>{V===null&&(B.current&&Lt(),t(`Config dialog dismissed`,{display:`system`}))},[V,Lt,t]),{context:`Settings`,isActive:V===null&&!k&&!m}),te(`settings:close`,Pt,{context:`Settings`,isActive:V===null&&!k&&!m});let Rt=(0,X.useCallback)(()=>{let e=G[E];if(!(!e||!e.onChange)){if(e.type===`boolean`){B.current=!0,e.onChange(!e.value),e.id===`thinkingEnabled`&&(!e.value===$e.current?bt(!1):n.messages.some(e=>e.type===`assistant`)&&bt(!0));return}if(e.id===`theme`||e.id===`model`||e.id===`showExternalIncludesDialog`||e.id===`outputStyle`||e.id===`language`)switch(e.id){case`theme`:H(`Theme`),a(!0);return;case`model`:H(`Model`),a(!0);return;case`showExternalIncludesDialog`:H(`ExternalIncludes`),a(!0);return;case`outputStyle`:H(`OutputStyle`),a(!0);return;case`language`:H(`Language`),a(!0);return}if(e.id===`autoUpdatesChannel`){if(W){H(`EnableAutoUpdates`),a(!0);return}(x?.autoUpdatesChannel??`latest`)===`latest`?(H(`ChannelDowngrade`),a(!0)):(B.current=!0,F(`userSettings`,{autoUpdatesChannel:`latest`,minimumVersion:void 0}),S(e=>({...e,autoUpdatesChannel:`latest`,minimumVersion:void 0})),z(`tengu_autoupdate_channel_changed`,{channel:`latest`}));return}if(e.type===`enum`){B.current=!0;let t=(e.options.indexOf(e.value)+1)%e.options.length;e.onChange(e.options[t]);return}}},[W,G,E,x?.autoUpdatesChannel,a]),Bt=e=>{bt(!1);let t=Math.max(0,Math.min(G.length-1,E+e));we(t),Mt(t)};return l({"select:previous":()=>{E===0?(bt(!1),A(!0),O(0)):Bt(-1)},"select:next":()=>Bt(1),"scroll:lineUp":()=>Bt(-1),"scroll:lineDown":()=>Bt(1),"select:accept":Rt,"select:previousValue":()=>Rt(),"select:nextValue":()=>Rt(),"settings:search":()=>{A(!0),xt(``)}},{context:`Settings`,isActive:V===null&&!k&&!m}),(0,Z.jsx)(d,{flexDirection:`column`,width:`100%`,tabIndex:0,autoFocus:!0,onKeyDown:(0,X.useCallback)(e=>{if(V===null&&!m){if(k){if(e.key===`escape`){e.preventDefault(),U.length>0?xt(``):A(!1);return}(e.key===`return`||e.key===`down`||e.key===`wheeldown`)&&(e.preventDefault(),A(!1),we(0),O(0));return}if(e.key===`left`||e.key===`right`||e.key===`tab`){e.preventDefault(),Rt();return}e.ctrl||e.meta||e.key===`j`||e.key===`k`||e.key===`/`||e.key.length===1&&e.key!==` `&&(e.preventDefault(),A(!0),xt(e.key))}},[V,m,k,U,xt,Rt]),children:V===`Theme`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Nt,{onThemeSelect:e=>{B.current=!0,ce(e),H(null),a(!1)},onCancel:()=>{H(null),a(!1)},hideEscToCancel:!0,skipExitHandling:!0}),(0,Z.jsx)(d,{children:(0,Z.jsx)(f,{dimColor:!0,italic:!0,children:(0,Z.jsxs)(p,{children:[(0,Z.jsx)(c,{shortcut:`Enter`,action:`select`}),(0,Z.jsx)(j,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]}):V===`Model`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(It,{initial:N,onSelect:e=>{B.current=!0,Ot(e),H(null),a(!1)},onCancel:()=>{H(null),a(!1)},showFastModeNotice:pt()?Le&&dt(N)&&mt():!1}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(p,{children:[(0,Z.jsx)(c,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(j,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]}):V===`ExternalIncludes`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(zt,{onDone:()=>{H(null),a(!1)},externalIncludes:be(Et)}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(p,{children:[(0,Z.jsx)(c,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(j,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`disable external includes`})]})})]}):V===`OutputStyle`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(cn,{initialStyle:C,onComplete:e=>{B.current=!0,me(e??`default`),H(null),a(!1),F(`localSettings`,{outputStyle:e}),z(`tengu_output_style_changed`,{style:e??`default`,source:`config_panel`,settings_source:`localSettings`})},onCancel:()=>{H(null),a(!1)}}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(p,{children:[(0,Z.jsx)(c,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(j,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]}):V===`Language`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(pn,{initialLanguage:T,onComplete:e=>{B.current=!0,ye(e),H(null),a(!1),F(`userSettings`,{language:e}),z(`tengu_language_changed`,{language:e??`default`,source:`config_panel`})},onCancel:()=>{H(null),a(!1)}}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(p,{children:[(0,Z.jsx)(c,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(j,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]}):V===`EnableAutoUpdates`?(0,Z.jsx)(le,{title:`Enable Auto-Updates`,onCancel:()=>{H(null),a(!1)},hideBorder:!0,hideInputGuide:!0,children:W?.type===`config`?(0,Z.jsx)(Ae,{options:[{label:`Enable with latest channel`,value:`latest`},{label:`Enable with stable channel`,value:`stable`}],onChange:e=>{B.current=!0,H(null),a(!1),I(e=>({...e,autoUpdates:!0})),y({...L(),autoUpdates:!0}),F(`userSettings`,{autoUpdatesChannel:e,minimumVersion:void 0}),S(t=>({...t,autoUpdatesChannel:e,minimumVersion:void 0})),z(`tengu_autoupdate_enabled`,{channel:e})}}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(f,{children:W?.type===`env`?`Auto-updates are controlled by an environment variable and cannot be changed here.`:`Auto-updates are disabled in development builds.`}),W?.type===`env`&&(0,Z.jsxs)(f,{dimColor:!0,children:[`Unset `,W.envVar,` to re-enable auto-updates.`]})]})}):V===`ChannelDowngrade`?(0,Z.jsx)(rn,{currentVersion:`0.0.7`,onChoice:e=>{if(H(null),a(!1),e===`cancel`)return;B.current=!0;let t={autoUpdatesChannel:`stable`};e===`stay`&&(t.minimumVersion=`0.0.7`),F(`userSettings`,t),S(e=>({...e,...t})),z(`tengu_autoupdate_channel_changed`,{channel:`stable`,minimum_version_set:e===`stay`})}}):(0,Z.jsxs)(d,{flexDirection:`column`,gap:1,marginY:oe?void 0:1,children:[(0,Z.jsx)(ae,{query:U,isFocused:k&&!m,isTerminalFocused:ke,cursorOffset:St,placeholder:`Search settings…`}),(0,Z.jsx)(d,{flexDirection:`column`,children:G.length===0?(0,Z.jsxs)(f,{dimColor:!0,italic:!0,children:[`No settings match "`,U,`"`]}):(0,Z.jsxs)(Z.Fragment,{children:[D>0&&(0,Z.jsxs)(f,{dimColor:!0,children:[s.arrowUp,` `,D,` more above`]}),G.slice(D,D+M).map((e,t)=>{let n=D+t===E&&!m&&!k;return(0,Z.jsx)(Y.Fragment,{children:(0,Z.jsxs)(d,{width:`100%`,children:[(0,Z.jsx)(d,{width:44,children:(0,Z.jsxs)(f,{color:n?`suggestion`:void 0,children:[n?s.pointer:` `,` `,e.label]})}),(0,Z.jsx)(d,{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()}),vt&&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:vn[e.value.toString()]??e.value.toString()}):e.id===`notifChannel`?(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:(0,Z.jsx)(_n,{value:e.value.toString()})}):e.id===`defaultPermissionMode`?(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:He(e.value)}):e.id===`autoUpdatesChannel`&&W?(0,Z.jsxs)(d,{flexDirection:`column`,children:[(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:`disabled`}),(0,Z.jsxs)(f,{dimColor:!0,children:[`(`,Ye(W),`)`]})]}):(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:e.value.toString()})})]})},e.id)}),D+M<G.length&&(0,Z.jsxs)(f,{dimColor:!0,children:[s.arrowDown,` `,G.length-D-M,` more below`]})]})}),m?(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(p,{children:[(0,Z.jsx)(c,{shortcut:`←/→ tab`,action:`switch`}),(0,Z.jsx)(c,{shortcut:`↓`,action:`return`}),(0,Z.jsx)(j,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`close`})]})}):k?(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(p,{children:[(0,Z.jsx)(f,{children:`Type to filter`}),(0,Z.jsx)(c,{shortcut:`Enter/↓`,action:`select`}),(0,Z.jsx)(c,{shortcut:`↑`,action:`tabs`}),(0,Z.jsx)(j,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`clear`})]})}):(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(p,{children:[(0,Z.jsx)(j,{action:`select:accept`,context:`Settings`,fallback:`Space`,description:`change`}),(0,Z.jsx)(j,{action:`settings:close`,context:`Settings`,fallback:`Enter`,description:`save`}),(0,Z.jsx)(j,{action:`settings:search`,context:`Settings`,fallback:`/`,description:`search`}),(0,Z.jsx)(j,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]})})}function _n({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,vn,yn=t((()=>{g(),Y=n(h(),1),X=n(h(),1),vt(),o(),Je(),B(),m(),Ve(),me(),R(),$e(),bt(),Mt(),xe(),Pt(),ct(),Lt(),Rt(),on(),N(),fn(),hn(),T(),M(),G(),Bt(),Fe(),P(),b(),C(),a(),Ht(),O(),ut(),ye(),Z=y(),vn={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 bn({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 ${tt(o,!0,r)}`),i&&(c=c?`${i} · ${c}`:i),n>=62?(0,Q.jsxs)(d,{flexDirection:`column`,children:[(0,Q.jsx)(f,{bold:!0,children:e}),(0,Q.jsxs)(d,{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)(d,{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 xn(){let[e,t]=(0,wn.useState)(null),[n,r]=(0,wn.useState)(null),[i,a]=(0,wn.useState)(!0),{columns:o}=se(),s=o-2,c=Math.min(s,80),l=Cn.useCallback(async()=>{a(!0),r(null);try{let e=await Wt();t(e)}catch(e){Qe(e);let t=e,n=t.response?.data?ze(t.response.data):void 0;r(n?`Failed to load usage data: ${n}`:`Failed to load usage data`)}finally{a(!1)}},[]);if((0,wn.useEffect)(()=>{l()},[l]),te(`settings:retry`,()=>{l()},{context:`Settings`,isActive:!!n&&!i}),n)return(0,Q.jsxs)(d,{flexDirection:`column`,gap:1,children:[(0,Q.jsxs)(f,{color:`error`,children:[`Error: `,n]}),(0,Q.jsx)(f,{dimColor:!0,children:(0,Q.jsxs)(p,{children:[(0,Q.jsx)(j,{action:`settings:retry`,context:`Settings`,fallback:`r`,description:`retry`}),(0,Q.jsx)(j,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]});if(!e)return(0,Q.jsxs)(d,{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)(j,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})})]});let u=it(),ee=u===`max`||u===`team`||u===null,ne=[{title:`Current session`,limit:e.five_hour},{title:`Current week (all models)`,limit:e.seven_day},...ee?[{title:`Current week (Sonnet only)`,limit:e.seven_day_sonnet}]:[]];return(0,Q.jsxs)(d,{flexDirection:`column`,gap:1,width:`100%`,children:[ne.some(({limit:e})=>e)||(0,Q.jsx)(f,{dimColor:!0,children:`/usage is only available for subscription plans.`}),ne.map(({title:e,limit:t})=>t&&(0,Q.jsx)(bn,{title:e,limit:t,maxWidth:c},e)),e.extra_usage&&(0,Q.jsx)(Sn,{extraUsage:e.extra_usage,maxWidth:c}),Gt()&&(0,Q.jsx)(qt,{maxWidth:c}),(0,Q.jsx)(f,{dimColor:!0,children:(0,Q.jsx)(j,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})})]})}function Sn({extraUsage:e,maxWidth:t}){let n=it();if(!(n===`pro`||n===`max`))return!1;if(!e.is_enabled)return E.isEnabled()?(0,Q.jsxs)(d,{flexDirection:`column`,children:[(0,Q.jsx)(f,{bold:!0,children:Tn}),(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)(d,{flexDirection:`column`,children:[(0,Q.jsx)(f,{bold:!0,children:Tn}),(0,Q.jsx)(f,{dimColor:!0,children:`Unlimited`})]});if(typeof e.used_credits!=`number`||typeof e.utilization!=`number`)return null;let r=k(e.used_credits/100,2),i=k(e.monthly_limit/100,2),a=new Date,o=new Date(a.getFullYear(),a.getMonth()+1,1);return(0,Q.jsx)(bn,{title:Tn,limit:{utilization:e.utilization,resets_at:o.toISOString()},showTimeInReset:!1,extraSubtext:`${r} / ${i} spent`,maxWidth:t})}var Cn,wn,Q,Tn,En=t((()=>{Cn=n(h(),1),wn=n(h(),1),fe(),S(),rt(),O(),g(),vt(),Ut(),et(),R(),Re(),M(),Kt(),Q=y(),Tn=`Extra usage`}));function Dn({onClose:e,context:t,defaultTab:n}){let[r,i]=(0,On.useState)(n),[a,o]=(0,On.useState)(!1),[s,c]=(0,On.useState)(!1),l=jt(),{rows:u}=At(se()),d=l?u+1:Math.max(15,Math.min(Math.floor(u*.8),30)),[f]=(0,On.useState)(()=>Xt().catch(()=>[]));return Ot(),te(`confirm:no`,()=>{a||e(`Status dialog dismissed`,{display:`system`})},{context:`Settings`,isActive:!a&&!(r===`Config`&&s)}),(0,$.jsx)(v,{color:`permission`,children:(0,$.jsx)(ce,{color:`permission`,selectedTab:r,onTabChange:i,hidden:a,initialHeaderFocused:n!==`Config`,contentHeight:a||l?void 0:d,children:[(0,$.jsx)(oe,{title:`Status`,children:(0,$.jsx)(Qt,{context:t,diagnosticsPromise:f})},`status`),(0,$.jsx)(oe,{title:`Config`,children:(0,$.jsx)(On.Suspense,{fallback:null,children:(0,$.jsx)(gn,{context:t,onClose:e,setTabsHidden:o,onIsSearchModeChange:c,contentHeight:d})})},`config`),(0,$.jsx)(oe,{title:`Usage`,children:(0,$.jsx)(xn,{})},`usage`)]})})}var On,$,kn=t((()=>{h(),On=n(h(),1),vt(),kt(),O(),G(),g(),nn(),yn(),En(),$=y()}));export{kn as n,Dn as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./figures-5ThXQEtq.js";import{I as r,P as i,fi as a,mt as o,t as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./figures-5ThXQEtq.js";import{I as r,P as i,fi as a,mt as o,t as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{NS as l,PS as u,Sy as d,_y as f,by as p,vy as m}from"./loadAgentsDir-x3rlgED4.js";t();var h=e(a(),1);s(),u(),m();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[a,s]=o(100),c=Math.floor(s/100)%_.length,l=v.findIndex(t=>t.key===e);return(0,g.jsxs)(r,{ref:a,flexDirection:`column`,paddingX:1,paddingY:1,children:[(0,g.jsx)(r,{marginBottom:1,children:(0,g.jsxs)(i,{bold:!0,color:`claude`,children:[_[c],` Teleporting session…`]})}),t&&(0,g.jsx)(r,{marginBottom:1,children:(0,g.jsx)(i,{dimColor:!0,children:t})}),(0,g.jsx)(r,{flexDirection:`column`,marginLeft:2,children:v.map((e,t)=>{let a=t<l,o=t===l,s=t>l,u,d;return a?(u=n.tick,d=`green`):o?(u=_[c],d=`claude`):(u=n.circle,d=void 0),(0,g.jsxs)(r,{flexDirection:`row`,children:[(0,g.jsx)(r,{width:2,children:(0,g.jsx)(i,{color:d,dimColor:s,children:u})}),(0,g.jsx)(i,{dimColor:s,bold:o,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)(l,{children:(0,g.jsx)(r,{})}));let i=await d(t,n);n(`checking_out`);let{branchName:a,branchError:o}=await f(i.branch);return{messages:p(i.log,o),branchName:a}}export{b as teleportWithProgress};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,P as n,fi as r,t as i,y as a}from"./src-CDCSSo0U2.js";import{t as o}from"./jsx-runtime-Bb4Xn-E0.js";import{
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,P as n,fi as r,t as i,y as a}from"./src-CDCSSo0U2.js";import{t as o}from"./jsx-runtime-Bb4Xn-E0.js";import{Eb as s,ix as c,rx as l,wb as u}from"./loadAgentsDir-x3rlgED4.js";import{f as d,l as f}from"./file-DcZWPH2V.js";import{a as p,r as m}from"./githubRepoPathMapping-8D0kpsif.js";var h=e(r(),1);i(),d(),l(),s();var g=o();function _({targetRepo:e,initialPaths:r,onSelectPath:i,onCancel:o}){let[s,l]=(0,h.useState)(r),[d,_]=(0,h.useState)(null),[v,y]=(0,h.useState)(!1),b=(0,h.useCallback)(async t=>{if(t===`cancel`){o();return}if(y(!0),_(null),await p(t,e)){i(t);return}m(e,t);let n=s.filter(e=>e!==t);l(n),y(!1),_(`${f(t)} no longer contains the correct repository. Select another path.`)},[e,s,i,o]),x=[...s.map(e=>({label:(0,g.jsxs)(n,{children:[`Use `,(0,g.jsx)(n,{bold:!0,children:f(e)})]}),value:e})),{label:`Cancel`,value:`cancel`}];return(0,g.jsx)(a,{title:`Teleport to Repo`,onCancel:o,color:`background`,children:s.length>0?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(t,{flexDirection:`column`,gap:1,children:[d&&(0,g.jsx)(n,{color:`error`,children:d}),(0,g.jsxs)(n,{children:[`Open Claude Code in `,(0,g.jsx)(n,{bold:!0,children:e}),`:`]})]}),v?(0,g.jsxs)(t,{children:[(0,g.jsx)(u,{}),(0,g.jsx)(n,{children:` Validating repository…`})]}):(0,g.jsx)(c,{options:x,onChange:e=>void b(e)})]}):(0,g.jsxs)(t,{flexDirection:`column`,gap:1,children:[d&&(0,g.jsx)(n,{color:`error`,children:d}),(0,g.jsxs)(n,{dimColor:!0,children:[`Run claude --teleport from a checkout of `,e]})]})})}export{_ as TeleportRepoMismatchDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{D as t,I as n,P as r,T as i,Wt as a,fi as o,hn as s,ot as c,t as l}from"./src-CDCSSo0U2.js";import{t as u}from"./jsx-runtime-Bb4Xn-E0.js";import{en as d,pr as f}from"./state-ix0xIunV.js";import{
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{D as t,I as n,P as r,T as i,Wt as a,fi as o,hn as s,ot as c,t as l}from"./src-CDCSSo0U2.js";import{t as u}from"./jsx-runtime-Bb4Xn-E0.js";import{en as d,pr as f}from"./state-ix0xIunV.js";import{Eb as p,Sb as m,Sy as h,XS as g,fx as _,hx as v,ix as y,mx as b,px as x,rx as S,vy as C,wb as w,xb as T}from"./loadAgentsDir-x3rlgED4.js";import{F as E,N as D,a as O,l as k,z as A}from"./debug-BrXObCdR.js";import{n as j,r as M}from"./analytics-BotDBGh0.js";import{b as N,m as P}from"./startupProfiler-xa3NmN7Z.js";import{i as F,n as I}from"./detectRepository-BPr0VWNO.js";import{n as L,o as R}from"./api-2cdIPaeq.js";import{u as z}from"./referral-CKmHHxj_.js";var B=e(o(),1);d(),j(),A(),C();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),M(`tengu_teleport_resume_session`,{source:e,session_id:t.id});try{let e=await h(t.id);return f({sessionId:t.id}),n(!1),e}catch(e){let t={message:e instanceof D?e.message:E(e),formattedMessage:e instanceof D?e.formattedMessage:void 0,isOperationError:e instanceof D};return i(t),n(!1),null}},[e]),isResuming:t,error:r,selectedSession:a,clearError:(0,B.useCallback)(()=>{i(null)},[])}}g(),R(),l(),z(),b(),O(),F(),N(),x(),S(),p(),m();var H=u(),U=`Updated`,W=` `;function G({onSelect:e,onCancel:o,isEmbedded:l=!1}){let{rows:u}=c(),[d,f]=(0,B.useState)([]),[p,m]=(0,B.useState)(null),[h,g]=(0,B.useState)(!0),[b,x]=(0,B.useState)(null),[S,C]=(0,B.useState)(!1),[E,D]=(0,B.useState)(!1),[O,A]=(0,B.useState)(1),j=v(`confirm:no`,`Confirmation`,`Esc`),M=(0,B.useCallback)(async()=>{try{g(!0),x(null);let e=await I();m(e),k(`Current repository: ${e||`not detected`}`);let t=await L(),n=t;e&&(n=t.filter(t=>t.repo?`${t.repo.owner.login}/${t.repo.name}`===e:!1),k(`Filtered ${n.length} sessions for repo ${e} from ${t.length} total`));let r=[...n].sort((e,t)=>{let n=new Date(e.updated_at);return new Date(t.updated_at).getTime()-n.getTime()});f(r)}catch(e){let t=e instanceof Error?e.message:String(e);k(`Error loading code sessions: ${t}`),x(K(t))}finally{g(!1),C(!1)}},[]),N=()=>{C(!0),M()};a(`confirm:no`,o,{context:`Confirmation`}),s((e,t)=>{if(t.ctrl&&e===`c`){o();return}if(t.ctrl&&e===`r`&&b){N();return}if(b!==null&&t.return){o();return}});let F=(0,B.useCallback)(()=>{D(!0),M()},[D,M]);if(!E)return(0,H.jsx)(T,{onComplete:F});if(h)return(0,H.jsxs)(n,{flexDirection:`column`,padding:1,children:[(0,H.jsxs)(n,{flexDirection:`row`,children:[(0,H.jsx)(w,{}),(0,H.jsx)(r,{bold:!0,children:`Loading Claude Code sessions…`})]}),(0,H.jsx)(r,{dimColor:!0,children:S?`Retrying…`:`Fetching your Claude Code sessions…`})]});if(b)return(0,H.jsxs)(n,{flexDirection:`column`,padding:1,children:[(0,H.jsx)(r,{bold:!0,color:`error`,children:`Error loading Claude Code sessions`}),q(b),(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:j}),` to cancel`]})]});if(d.length===0)return(0,H.jsxs)(n,{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)(n,{marginTop:1,children:(0,H.jsxs)(r,{dimColor:!0,children:[`Press `,(0,H.jsx)(r,{bold:!0,children:j}),` to cancel`]})})]});let R=d.map(e=>({...e,timeString:P(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,l?Math.min(d.length,5,u-6-7):Math.min(d.length,u-1-7));return(0,H.jsxs)(n,{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:[` `,`(`,O,` of `,d.length,`)`]}),p&&(0,H.jsxs)(r,{dimColor:!0,children:[` (`,p,`)`]}),`:`]}),(0,H.jsxs)(n,{flexDirection:`column`,marginTop:1,flexGrow:1,children:[(0,H.jsx)(n,{marginLeft:2,children:(0,H.jsxs)(r,{bold:!0,children:[U.padEnd(z,` `),W,`Session Title`]})}),(0,H.jsx)(y,{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&&A(t+1)}})]}),(0,H.jsx)(n,{flexDirection:`row`,children:(0,H.jsx)(r,{dimColor:!0,children:(0,H.jsxs)(i,{children:[(0,H.jsx)(t,{shortcut:`↑/↓`,action:`select`}),(0,H.jsx)(t,{shortcut:`Enter`,action:`confirm`}),(0,H.jsx)(_,{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)(n,{marginY:1,flexDirection:`column`,children:(0,H.jsx)(r,{dimColor:!0,children:`Check your internet connection`})});case`auth`:return(0,H.jsx)(n,{marginY:1,flexDirection:`column`,children:(0,H.jsx)(r,{dimColor:!0,children:`Teleport requires a Claude account`})});case`api`:return(0,H.jsx)(n,{marginY:1,flexDirection:`column`,children:(0,H.jsx)(r,{dimColor:!0,children:`Sorry, Claude encountered an error`})});case`other`:return(0,H.jsx)(n,{marginY:1,flexDirection:`row`,children:(0,H.jsx)(r,{dimColor:!0,children:`Sorry, Claude Code encountered an error`})})}}j(),l(),z(),p();function J({onComplete:e,onCancel:t,onError:i,isEmbedded:o=!1,source:s}){let{resumeSession:c,isResuming:l,error:u,selectedSession:d}=V(s);(0,B.useEffect)(()=>{M(`tengu_teleport_started`,{source:s})},[s]);let f=async t=>{let n=await c(t);n?e(n):u&&i&&i(u.message,u.formattedMessage)},p=()=>{M(`tengu_teleport_cancelled`,{}),t()};return a(`app:interrupt`,p,{context:`Global`,isActive:!!u&&!i}),l&&d?(0,H.jsxs)(n,{flexDirection:`column`,padding:1,children:[(0,H.jsxs)(n,{flexDirection:`row`,children:[(0,H.jsx)(w,{}),(0,H.jsx)(r,{bold:!0,children:`Resuming session…`})]}),(0,H.jsxs)(r,{dimColor:!0,children:[`Loading "`,d.title,`"…`]})]}):u&&!i?(0,H.jsxs)(n,{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)(n,{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:o})}export{J as TeleportResumeWrapper};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{D as t,H as n,I as r,P as i,T as a,U as o,V as s,Wt as c,Xt as l,fi as u,ot as d,t as f}from"./src-CDCSSo0U2.js";import{t as p}from"./jsx-runtime-Bb4Xn-E0.js";import{
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{D as t,H as n,I as r,P as i,T as a,U as o,V as s,Wt as c,Xt as l,fi as u,ot as d,t as f}from"./src-CDCSSo0U2.js";import{t as p}from"./jsx-runtime-Bb4Xn-E0.js";import{$S as m,FS as h,Hf as g,LS as _,PS as v,Rf as y,Uf as b,Wf as x,XS as S,ZS as C,gx as w,hx as T,ix as E,mx as D,rx as O,zf as k}from"./loadAgentsDir-x3rlgED4.js";import{g as A,x as j}from"./settings-BeLFUeie.js";import{u as M}from"./referral-CKmHHxj_.js";import{n as N,t as P}from"./useExitOnCtrlCDWithKeybindings-BwsZ5f0s.js";function F({onThemeSelect:e,showIntroText:u=!1,helpText:f=``,showHelpTextBelow:p=!1,hideEscToCancel:m=!1,skipExitHandling:v=!1,onCancel:x}){let[S]=n(),w=o(),{columns:D}=d(),O=g(),k=O===null?b(S):null,{setPreviewTheme:A,savePreview:M,cancelPreview:P}=s(),F=h(e=>e.settings.syntaxHighlightingDisabled)??!1,L=_();l(`ThemePicker`);let R=T(`theme:toggleSyntaxHighlighting`,`ThemePicker`,`ctrl+t`);c(`theme:toggleSyntaxHighlighting`,()=>{if(O===null){let e=!F;j(`userSettings`,{syntaxHighlightingDisabled:e}),L(t=>({...t,settings:{...t.settings,syntaxHighlightingDisabled:e}}))}},{context:`ThemePicker`});let z=N(v?()=>{}: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)(r,{flexDirection:`column`,gap:1,children:[(0,I.jsxs)(r,{flexDirection:`column`,gap:1,children:[u?(0,I.jsx)(i,{children:`Let's get started.`}):(0,I.jsx)(i,{bold:!0,color:`permission`,children:`Theme`}),(0,I.jsxs)(r,{flexDirection:`column`,children:[(0,I.jsx)(i,{bold:!0,children:`Choose the text style that looks best with your terminal`}),f&&!p&&(0,I.jsx)(i,{dimColor:!0,children:f})]}),(0,I.jsx)(E,{options:B,onFocus:e=>{A(e)},onChange:t=>{M(),e(t)},onCancel:v?()=>{P(),x?.()}:async()=>{P(),await C(0)},visibleOptionCount:B.length,defaultValue:w,defaultFocusValue:w})]}),(0,I.jsxs)(r,{flexDirection:`column`,width:`100%`,children:[(0,I.jsx)(r,{flexDirection:`column`,borderTop:!0,borderBottom:!0,borderLeft:!1,borderRight:!1,borderStyle:`dashed`,borderColor:`subtle`,children:(0,I.jsx)(y,{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)(i,{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)`:k?`Syntax theme: ${k.theme}${k.source?` (from ${k.source})`:``} (${R} to disable)`:`Syntax highlighting enabled (${R} to disable)`]})]})]});return u?V:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(r,{flexDirection:`column`,children:V}),(0,I.jsxs)(r,{marginTop:1,children:[p&&f&&(0,I.jsx)(r,{marginLeft:3,children:(0,I.jsx)(i,{dimColor:!0,children:f})}),!m&&(0,I.jsx)(r,{children:(0,I.jsx)(i,{dimColor:!0,italic:!0,children:z.pending?(0,I.jsxs)(I.Fragment,{children:[`Press `,z.keyName,` again to exit`]}):(0,I.jsxs)(a,{children:[(0,I.jsx)(t,{shortcut:`Enter`,action:`select`}),(0,I.jsx)(t,{shortcut:`Esc`,action:`cancel`})]})})})]})]})}var I,L=e((()=>{u(),P(),S(),f(),w(),M(),D(),v(),m(),A(),O(),x(),k(),I=p()}));export{L as n,F as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,P as n,Wt as r,fi as i,t as a}from"./src-CDCSSo0U2.js";import{t as o}from"./jsx-runtime-Bb4Xn-E0.js";import{en as s,ur as c}from"./state-ix0xIunV.js";import{$S as l,A_ as u,M_ as d,QS as f,Sw as p,ix as m,rx as h,xw as g}from"./loadAgentsDir-x3rlgED4.js";import{n as _,t as v}from"./cwd-CYmmnQVS.js";import{d as y,p as b}from"./debug-BrXObCdR.js";import{c as x,g as S}from"./settings-BeLFUeie.js";import{g as C,n as w,y as T}from"./config-DRDuVyzE.js";import{n as E,r as D}from"./analytics-BotDBGh0.js";import{bn as O}from"./prompt-CE3sFmZV.js";import{u as k}from"./referral-CKmHHxj_.js";import{n as A,t as j}from"./managedEnvConstants-BPwL2aWI.js";import{n as M,t as N}from"./useExitOnCtrlCDWithKeybindings-BwsZ5f0s.js";import{n as P,t as F}from"./PermissionDialog-0ya1CU5k.js";import{homedir as I}from"os";var L=e(i(),1),R=o();a(),s(),_(),b(),E(),C(),l(),k(),h(),d(),N(),P(),S(),O(),A(),p();function z(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 B(){let e=[];return z(x(`projectSettings`))&&e.push(`.claude/settings.json`),z(x(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function V(e){return e.some(e=>e.ruleBehavior===`allow`&&(e.ruleValue.toolName===`Bash`||e.ruleValue.toolName.startsWith(`Bash(`)))}function H(){let e=[];return V(g(`projectSettings`))&&e.push(`.claude/settings.json`),V(g(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function U(e){return!!e?.otelHeadersHelper}function W(){let e=[];return U(x(`projectSettings`))&&e.push(`.claude/settings.json`),U(x(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function G(e){return!!e?.apiKeyHelper}function K(){let e=[];return G(x(`projectSettings`))&&e.push(`.claude/settings.json`),G(x(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function q(e){return!!(e?.awsAuthRefresh||e?.awsCredentialExport)}function J(){let e=[];return q(x(`projectSettings`))&&e.push(`.claude/settings.json`),q(x(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function Y(e){return!!e?.gcpAuthRefresh}function X(){let e=[];return Y(x(`projectSettings`))&&e.push(`.claude/settings.json`),Y(x(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function Z(e){return e?.env?Object.keys(e.env).some(e=>!j.has(e.toUpperCase())):!1}function Q(){let e=[];return Z(x(`projectSettings`))&&e.push(`.claude/settings.json`),Z(x(`localSettings`))&&e.push(`.claude/settings.local.json`),e}O();function $({onDone:e,commands:i}){let{servers:a}=u(`project`),o=Object.keys(a).length>0,s=B().length>0,l=H(),d=K().length>0,p=J().length>0,h=X().length>0,g=W().length>0,_=Q().length>0,b=i?.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,x=i?.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,S=l.length>0||b||x,C=w(),[E,O]=L.useState(null);L.useEffect(()=>{if(E!==null){let e=E,t=setTimeout(()=>f(e));return()=>clearTimeout(t)}},[E]),L.useEffect(()=>{D(`tengu_trust_dialog_shown`,{isHomeDir:I()===v(),hasMcpServers:o,hasHooks:s,hasBashExecution:S,hasApiKeyHelper:d,hasAwsCommands:p,hasGcpCommands:h,hasOtelHeadersHelper:g,hasDangerousEnvVars:_})},[o,s,S,d,p,h,g,_]);function k(t){if(t===`exit`){O(1);return}let n=I()===v();D(`tengu_trust_dialog_accept`,{isHomeDir:n,hasMcpServers:o,hasHooks:s,hasBashExecution:S,hasApiKeyHelper:d,hasAwsCommands:p,hasGcpCommands:h,hasOtelHeadersHelper:g,hasDangerousEnvVars:_}),n?c(!0):T(e=>({...e,hasTrustDialogAccepted:!0})),e()}let A=M(()=>O(1));return r(`confirm:no`,()=>{O(0)},{context:`Confirmation`}),E===null?C?(setTimeout(e),null):(0,R.jsx)(F,{color:`warning`,titleColor:`warning`,title:`Accessing workspace:`,children:(0,R.jsxs)(t,{flexDirection:`column`,gap:1,paddingTop:1,children:[(0,R.jsx)(n,{bold:!0,children:y().cwd()}),(0,R.jsx)(n,{children:`Is this a project you trust? (Your own code, a well-known open source project, or work from your team).`}),(0,R.jsx)(n,{children:`Once trusted, Work Mate can read, edit, and run commands in this folder.`}),(0,R.jsx)(m,{options:[{label:`Yes, I trust this folder`,value:`enable_all`},{label:`No, exit`,value:`exit`}],onChange:e=>k(e),onCancel:()=>k(`exit`)}),(0,R.jsx)(n,{dimColor:!0,children:A.pending?(0,R.jsxs)(R.Fragment,{children:[`Press `,A.keyName,` again to exit`]}):(0,R.jsx)(R.Fragment,{children:`Enter to confirm · Esc to cancel`})})]})}):null}export{$ as TrustDialog};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./figures-5ThXQEtq.js";import{H as r,I as i,P as a,fi as o,j as s,t as c}from"./src-CDCSSo0U2.js";import{t as l}from"./jsx-runtime-Bb4Xn-E0.js";import{O as u,k as d}from"./config-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./figures-5ThXQEtq.js";import{H as r,I as i,P as a,fi as o,j as s,t as c}from"./src-CDCSSo0U2.js";import{t as l}from"./jsx-runtime-Bb4Xn-E0.js";import{O as u,k as d}from"./config-DRDuVyzE.js";function f(e,t,n,r){return r=typeof r==`function`?r:void 0,e==null?e:u(e,t,n,r)}var p=e((()=>{d()}));function m(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],p=i===d.length-1,m=s===0&&i===0?``:t,g=l(p?h.lastBranch:h.branch,a.treeChar),_=r.trim()===``?``:l(r,a.key),v=m+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,m+l(p?h.empty:h.line,a.treeChar)+` `,p,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(h.lastBranch,a.treeChar),r=l(e[t],a.value);return n+` `+r}return u(e,``,!0),o.join(`
|
|
2
2
|
`)}var h,g=e((()=>{t(),c(),h={branch:n.lineUpDownRight,lastBranch:n.lineUpRight,line:n.lineVertical,empty:` `}}));function _(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(`.`)}f(t,r,e.message,Object)}),t}function v({errors:e}){let[t]=r();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,y.jsx)(i,{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 o=_(r),s=new Map;r.forEach(e=>{if(e.suggestion||e.docLink){let t=`${e.suggestion||``}|${e.docLink||``}`;s.has(t)||s.set(t,{suggestion:e.suggestion,docLink:e.docLink})}});let c=m(o,{showValues:!0,themeName:t,treeCharColors:{treeChar:`inactive`,key:`text`,value:`inactive`}});return(0,y.jsxs)(i,{flexDirection:`column`,children:[(0,y.jsx)(a,{children:e}),(0,y.jsx)(i,{marginLeft:1,children:(0,y.jsx)(a,{dimColor:!0,children:c})}),s.size>0&&(0,y.jsx)(i,{flexDirection:`column`,marginTop:1,children:Array.from(s.values()).map((e,t)=>(0,y.jsxs)(i,{flexDirection:`column`,marginBottom:1,children:[e.suggestion&&(0,y.jsx)(a,{dimColor:!0,wrap:`wrap`,children:e.suggestion}),e.docLink&&(0,y.jsxs)(a,{dimColor:!0,wrap:`wrap`,children:[`Learn more: `,e.docLink]})]},`suggestion-pair-${t}`))})]},e)})})}var y,b=e((()=>{p(),o(),c(),g(),y=l()}));export{b as n,v as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-DaDcL9Zw.js";import{H as e,I as t,P as n,fi as r,t as i}from"./src-CDCSSo0U2.js";import{t as a}from"./jsx-runtime-Bb4Xn-E0.js";import{
|
|
1
|
+
import"./rolldown-runtime-DaDcL9Zw.js";import{H as e,I as t,P as n,fi as r,t as i}from"./src-CDCSSo0U2.js";import{t as a}from"./jsx-runtime-Bb4Xn-E0.js";import{$t as o,Xt as s}from"./settings-BeLFUeie.js";r(),i(),o();var c=a(),l=58;function u(){let[r]=e(),i=`Welcome to Work Mate`;return s.terminal===`Apple_Terminal`?(0,c.jsx)(d,{theme:r,welcomeMessage:i}):[`light`,`light-daltonized`,`light-ansi`].includes(r)?(0,c.jsxs)(t,{width:l,flexDirection:`column`,children:[(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{color:`claudeBlue_FOR_SYSTEM_SPINNER`,children:[i,` `]}),(0,c.jsxs)(n,{dimColor:!0,children:[`v`,`0.0.7`,` `]})]}),(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)(t,{width:l,flexDirection:`column`,children:[(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{color:`claudeBlue_FOR_SYSTEM_SPINNER`,children:[i,` `]}),(0,c.jsxs)(n,{dimColor:!0,children:[`v`,`0.0.7`,` `]})]}),(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.jsx)(n,{dimColor:!0,children:` * `})]})}function d({theme:e,welcomeMessage:r}){return[`light`,`light-daltonized`,`light-ansi`].includes(e)?(0,c.jsxs)(t,{width:l,flexDirection:`column`,children:[(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{color:`claudeBlue_FOR_SYSTEM_SPINNER`,children:[r,` `]}),(0,c.jsxs)(n,{dimColor:!0,children:[`v`,`0.0.7`,` `]})]}),(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)(t,{width:l,flexDirection:`column`,children:[(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{color:`claudeBlue_FOR_SYSTEM_SPINNER`,children:[r,` `]}),(0,c.jsxs)(n,{dimColor:!0,children:[`v`,`0.0.7`,` `]})]}),(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:` ░░░░░░░░░░░░░░░░ `})]})}export{u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./figures-5ThXQEtq.js";import{I as i,P as a,di as o,fi as s,t as c,ui as l}from"./src-CDCSSo0U2.js";import{t as u}from"./jsx-runtime-Bb4Xn-E0.js";import{en as d,h as f,mn as p}from"./state-ix0xIunV.js";import{
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./figures-5ThXQEtq.js";import{I as i,P as a,di as o,fi as s,t as c,ui as l}from"./src-CDCSSo0U2.js";import{t as u}from"./jsx-runtime-Bb4Xn-E0.js";import{en as d,h as f,mn as p}from"./state-ix0xIunV.js";import{L as m,R as h,Ub as g,Wb as _,_w as v,pD as y,pw as b,uD as x,vw as S,z as C}from"./loadAgentsDir-x3rlgED4.js";import{n as w,t as T}from"./AddWorkspaceDirectory-CFrrXnt9.js";function E({message:e,args:t,onDone:n}){return(0,O.useEffect)(()=>{let e=setTimeout(n,0);return()=>clearTimeout(e)},[n]),(0,k.jsxs)(i,{flexDirection:`column`,children:[(0,k.jsxs)(a,{dimColor:!0,children:[r.pointer,` /add-dir `,t]}),(0,k.jsx)(g,{children:(0,k.jsx)(a,{children:e})})]})}async function D(e,t,n){let r=(n??``).trim(),i=t.getAppState(),a=async(n,r=!1)=>{let i={type:`addDirectories`,directories:[n],destination:r?`localSettings`:`session`},a=b(t.getAppState().toolPermissionContext,i);t.setAppState(e=>({...e,toolPermissionContext:a}));let o=f();o.includes(n)||p([...o,n]),x.refreshConfig();let s;if(r)try{S(i),s=`Added ${l.bold(n)} as a working directory and saved to local settings`}catch(e){s=`Added ${l.bold(n)} as a working directory. Failed to save to local settings: ${e instanceof Error?e.message:`Unknown error`}`}else s=`Added ${l.bold(n)} as a working directory for this session`;e(`${s} ${l.dim(`· /permissions to manage`)}`)};if(!r)return(0,k.jsx)(T,{permissionContext:i.toolPermissionContext,onAddDirectory:a,onCancel:()=>{e(`Did not add a working directory.`)}});let o=await C(r,i.toolPermissionContext);if(o.resultType!==`success`){let t=m(o);return(0,k.jsx)(E,{message:t,args:n??``,onDone:()=>e(t)})}return(0,k.jsx)(T,{directoryPath:o.absolutePath,permissionContext:i.toolPermissionContext,onAddDirectory:a,onCancel:()=>{e(`Did not add ${l.bold(o.absolutePath)} as a working directory.`)}})}var O,k;e((()=>{o(),n(),O=t(s(),1),d(),_(),w(),c(),v(),y(),h(),k=u()}))();export{D as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Nh as t,Ph as n}from"./loadAgentsDir-x3rlgED4.js";import{fn as r,pn as i}from"./settings-BeLFUeie.js";function a(e,t){let n=new Map;for(let e of t)n.set(e.agentType,e);let r=new Set,i=[];for(let t of e){let e=`${t.agentType}:${t.source}`;if(r.has(e))continue;r.add(e);let a=n.get(t.agentType),o=a&&a.source!==t.source?a.source:void 0;i.push({...t,overriddenBy:o})}return i}function o(e){let n=e.model||t();if(n)return n===`inherit`?`inherit`:n}function s(e){return r(e).toLowerCase()}function c(e,t){return e.agentType.localeCompare(t.agentType,void 0,{sensitivity:`base`})}var l,u=e((()=>{n(),i(),l=[{label:`User agents`,source:`userSettings`},{label:`Project agents`,source:`projectSettings`},{label:`Local agents`,source:`localSettings`},{label:`Managed agents`,source:`policySettings`},{label:`Plugin agents`,source:`plugin`},{label:`CLI arg agents`,source:`flagSettings`},{label:`Built-in agents`,source:`built-in`}]}));export{o as a,u as i,c as n,a as o,s as r,l as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e,o as t,r as n}from"./loadAgentsDir-
|
|
1
|
+
import{i as e,o as t,r as n}from"./loadAgentsDir-x3rlgED4.js";import{n as r,t as i}from"./cwd-CYmmnQVS.js";import{a,i as o,n as s,o as c,r as l,t as u}from"./agentDisplay-CMmHIl86.js";o(),t(),r();function d(e){let t=a(e),n=[e.agentType];return t&&n.push(t),e.memory&&n.push(`${e.memory} memory`),n.join(` · `)}async function f(){let{allAgents:t}=await e(i()),r=c(t,n(t)),a=[],o=0;for(let{label:e,source:t}of u){let n=r.filter(e=>e.source===t).sort(s);if(n.length!==0){a.push(`${e}:`);for(let e of n)if(e.overriddenBy){let t=l(e.overriddenBy);a.push(` (shadowed by ${t}) ${d(e)}`)}else a.push(` ${d(e)}`),o++;a.push(``)}}a.length===0?console.log(`No agents found.`):(console.log(`${o} active agents\n`),console.log(a.join(`
|
|
2
2
|
`).trimEnd()))}export{f as agentsHandler};
|