claude-code-best 2.8.2 → 2.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/chunks/{AddWorkspaceDirectory-BCCbaWoh.js → AddWorkspaceDirectory-CM5PYqoF.js} +1 -1
- package/dist/chunks/{App-BIAYUFvT.js → App-BLLQEMkd.js} +1 -1
- package/dist/chunks/ApproveApiKey-AMXQPmfE.js +1 -0
- package/dist/chunks/{ApproveApiKey-DRARgWX3.js → ApproveApiKey-DrflOSA-.js} +1 -1
- package/dist/chunks/{AssistantSessionChooser-eUrEGDlX.js → AssistantSessionChooser-SlRne98s.js} +1 -1
- package/dist/chunks/BackgroundTasksDialog-Cciww_FF.js +2 -0
- package/dist/chunks/{BypassPermissionsModeDialog-8z7R5EpU.js → BypassPermissionsModeDialog-HaciDdx0.js} +1 -1
- package/dist/chunks/{ClaudeInChromeOnboarding-B7mDm5Hb.js → ClaudeInChromeOnboarding-EA3k_q2M.js} +1 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-C-T8G8O7.js +1 -0
- package/dist/chunks/{ClaudeMdExternalIncludesDialog-DE9dpWtg.js → ClaudeMdExternalIncludesDialog-xBclyqKk.js} +1 -1
- package/dist/chunks/ConsoleOAuthFlow-BTN62PKj.js +1 -0
- package/dist/chunks/{DesktopHandoff-Ce0nE7D6.js → DesktopHandoff-BhY_F3Ob.js} +1 -1
- package/dist/chunks/{DevChannelsDialog-mt0lA5wR.js → DevChannelsDialog-DU5komVT.js} +1 -1
- package/dist/chunks/DiffDialog-D_-znREV.js +3 -0
- package/dist/chunks/Doctor-BhrEYzPO.js +3 -0
- package/dist/chunks/Doctor-CjnUU1CY.js +1 -0
- package/dist/chunks/{ExitFlow-C3BGvwv-.js → ExitFlow-cRfxceuS.js} +2 -2
- package/dist/chunks/{Feedback-BtZb1A8b.js → Feedback-BMv8Kt05.js} +2 -2
- package/dist/chunks/Grove-CRAZGlvf.js +1 -0
- package/dist/chunks/{Grove-HpMLktXp.js → Grove-CjfR7Acp.js} +1 -1
- package/dist/chunks/{HybridTransport-COk7jAC7.js → HybridTransport-D32dn9xc.js} +1 -1
- package/dist/chunks/{ITermBackend-BlwyeN8U.js → ITermBackend-BxjzkptA.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-QVIRDXwA.js → InvalidConfigDialog-CnCOCqMT.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-CZRZm0oa.js → InvalidSettingsDialog-CLOgpfR2.js} +1 -1
- package/dist/chunks/MCPConnectionManager-BhbT4Sah.js +1 -0
- package/dist/chunks/{McpParsingWarnings-DWMO0bV6.js → McpParsingWarnings-B5X5HVnQ.js} +1 -1
- package/dist/chunks/MessageSelector-DLofsxam.js +3 -0
- package/dist/chunks/Messages-D1-i4MMT.js +11 -0
- package/dist/chunks/{Onboarding-CHcND5Tt.js → Onboarding-Co5P3gZs.js} +1 -1
- package/dist/chunks/{OverageCreditUpsell-CMBqZrnz.js → OverageCreditUpsell-DjgcfVt2.js} +1 -1
- package/dist/chunks/PluginSettings-NB-Wod-9.js +17 -0
- package/dist/chunks/{PromptInputHelpMenu-CAwbW7z2.js → PromptInputHelpMenu-BDI5IF1s.js} +1 -1
- package/dist/chunks/QueryEngine-B217mLel.js +1 -0
- package/dist/chunks/REPL-BfprHNDt.js +1 -0
- package/dist/chunks/{REPL-Dx3SPe95.js → REPL-DCm_BFr_.js} +36 -36
- package/dist/chunks/{RemoteCallout-CwI1mLQ9.js → RemoteCallout-dGnKRIDB.js} +1 -1
- package/dist/chunks/{RemoteSessionManager-BXMBhfQD.js → RemoteSessionManager-BidAIOqZ.js} +2 -2
- package/dist/chunks/ResumeConversation-SDRT6hO3.js +1 -0
- package/dist/chunks/{SSETransport-Co-0nMlR.js → SSETransport-BM2xz03M.js} +1 -1
- package/dist/chunks/SearchExtraToolsTool-DCSReOsq.js +1 -0
- package/dist/chunks/{SentryErrorBoundary-kEgE7qeH.js → SentryErrorBoundary-D5niZGEU.js} +1 -1
- package/dist/chunks/SentryErrorBoundary-DzwCuftg.js +1 -0
- package/dist/chunks/Settings-D3ds_WCz.js +2 -0
- package/dist/chunks/{TeleportProgress--n-u7MYY.js → TeleportProgress-Dg6HcEO9.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-CzQzdYb2.js → TeleportRepoMismatchDialog-BUKNU2jx.js} +1 -1
- package/dist/chunks/{TeleportResumeWrapper-CtANoO1Z.js → TeleportResumeWrapper-5FTzA9R_.js} +1 -1
- package/dist/chunks/{ThemePicker-kBt6obJb.js → ThemePicker-Bdm12PmJ.js} +1 -1
- package/dist/chunks/{TmuxBackend-Q5xdOkW4.js → TmuxBackend-CYx3Hdf1.js} +2 -2
- package/dist/chunks/{TrustDialog-CoCFqyRD.js → TrustDialog-DGKf4iwh.js} +1 -1
- package/dist/chunks/{ValidationErrorsList-CL42YlaS.js → ValidationErrorsList-BP7vG1uX.js} +1 -1
- package/dist/chunks/{WelcomeV2-B0d9sH1c.js → WelcomeV2-k_969SnB.js} +1 -1
- package/dist/chunks/{WindowsTerminalBackend-CLSeqqHh.js → WindowsTerminalBackend-K_zVZBSP.js} +2 -2
- package/dist/chunks/{add-dir-IrADCHV-.js → add-dir-DnfUkb1n.js} +1 -1
- package/dist/chunks/{agentDisplay-BUXpQhYh.js → agentDisplay-DT04Kqdm.js} +1 -1
- package/dist/chunks/{agents-Cx0f6suK.js → agents-ELZyUElQ.js} +7 -7
- package/dist/chunks/{agents-BqQtaTaM.js → agents-hh7Zcqm6.js} +1 -1
- package/dist/chunks/{ant-BUkS8Em4.js → ant-CuQC6xHS.js} +1 -1
- package/dist/chunks/api-BY3NFL4L.js +1 -0
- package/dist/chunks/{api-Cy1N7XAQ.js → api-C-KY7A3r.js} +1 -1
- package/dist/chunks/asciicast-BeEmDIKr.js +1 -0
- package/dist/chunks/{asciicast-C_1Pi99k.js → asciicast-C0fPsv7_.js} +1 -1
- package/dist/chunks/assistant-C669PK45.js +1 -0
- package/dist/chunks/{assistant-C3dP-BSJ.js → assistant-DbtrknMt.js} +1 -1
- package/dist/chunks/{assistant-BGzd9a5x.js → assistant-Z-xFHPiY.js} +1 -1
- package/dist/chunks/{auth-DVtMm7Hj.js → auth-Bo_eeRO9.js} +1 -1
- package/dist/chunks/auth-C-rD91K7.js +1 -0
- package/dist/chunks/{autoMode-ThlM20qr.js → autoMode-BhsFtU8_.js} +6 -6
- package/dist/chunks/{autonomy-B637YdCF.js → autonomy-B-d3Xamr.js} +1 -1
- package/dist/chunks/{autonomy-B_vxYZbV.js → autonomy-C5wE-5B8.js} +12 -12
- package/dist/chunks/{autonomyPanel-BM2VhTsn.js → autonomyPanel-CMy4Zs1a.js} +1 -1
- package/dist/chunks/backgroundHousekeeping-YAOGWoo4.js +17 -0
- package/dist/chunks/backgroundHousekeeping-xFmPDL7y.js +1 -0
- package/dist/chunks/{branch-BlH5WYNu.js → branch-DoV3sEJf.js} +2 -2
- package/dist/chunks/{bridge-QRFJRzVG.js → bridge-8RYx23zW.js} +2 -2
- package/dist/chunks/{bridgeConfig-Di9LziJ3.js → bridgeConfig-C8tQXEsd.js} +1 -1
- package/dist/chunks/bridgeConfig-D5awYlvd.js +1 -0
- package/dist/chunks/bridgeEnabled-0tZw2TlM.js +1 -0
- package/dist/chunks/{bridgeEnabled-z1fPRzzV.js → bridgeEnabled-B3KTIVe4.js} +1 -1
- package/dist/chunks/bridgeMain-DKkE8RYG.js +1 -0
- package/dist/chunks/bridgeMain-Ssp8HRcV.js +68 -0
- package/dist/chunks/{bridgeMessaging-BG8fNZac.js → bridgeMessaging-DGTm_wDk.js} +1 -1
- package/dist/chunks/{btw-DpeWZQbf.js → btw-Du0mHeiD.js} +1 -1
- package/dist/chunks/{buddy-Bni2g0Km.js → buddy-D04AYSW6.js} +1 -1
- package/dist/chunks/{bypassPermissionsKillswitch-7e56Rquc.js → bypassPermissionsKillswitch-CRYkShwu.js} +1 -1
- package/dist/chunks/caches-Byd8SjTZ.js +1 -0
- package/dist/chunks/{caches-CzEBsMvP.js → caches-DYf69-N9.js} +2 -2
- package/dist/chunks/{ccrClient-iR6zwGb1.js → ccrClient-CDrBxSox.js} +1 -1
- package/dist/chunks/changeDetector-CGzGs92S.js +1 -0
- package/dist/chunks/{channelNotification-CSmLgwtO.js → channelNotification-CtA9HHFW.js} +1 -1
- package/dist/chunks/channelNotification-DOvTvOGt.js +1 -0
- package/dist/chunks/{chrome-BO1vbvZ0.js → chrome-BHbT4cc4.js} +1 -1
- package/dist/chunks/clear-BGLxPs_B.js +1 -0
- package/dist/chunks/client-CtOmoNuQ.js +1 -0
- package/dist/chunks/color-MOZYZ1cM.js +1 -0
- package/dist/chunks/commands-B3XpQmEm.js +1 -0
- package/dist/chunks/{commitAttribution-Djh1ZpYH.js → commitAttribution-BTtCTr8c.js} +1 -1
- package/dist/chunks/commitAttribution-CXNK79GW.js +1 -0
- package/dist/chunks/compact-CMqxm2yG.js +3 -0
- package/dist/chunks/{companion-C-jfFhlz.js → companion-ChxkOPHB.js} +1 -1
- package/dist/chunks/{config-DwsIX0hc.js → config-cRyRIPI7.js} +1 -1
- package/dist/chunks/{config-CloXpblh.js → config-wvQYYbwU.js} +1 -1
- package/dist/chunks/{context-DdwMoH4j.js → context-7ds9guuJ.js} +1 -1
- package/dist/chunks/{context-noninteractive-BWbEqad6.js → context-noninteractive-CISZymIU.js} +2 -2
- package/dist/chunks/context-noninteractive-CwJBBF8h.js +1 -0
- package/dist/chunks/conversation-Bgsdn99n.js +1 -0
- package/dist/chunks/conversation-D30CU_jS.js +1 -0
- package/dist/chunks/{copy-tl-41wwU.js → copy-Dvz2Mge4.js} +2 -2
- package/dist/chunks/{createSSHSession-B_IyqOll.js → createSSHSession-Befx8LiM.js} +1 -1
- package/dist/chunks/createSession-Cp0KTjPL.js +1 -0
- package/dist/chunks/{createSession-Csaqw8kb.js → createSession-CsZGoika.js} +1 -1
- package/dist/chunks/{cronJitterConfig-2sHTXBLu.js → cronJitterConfig-Dfl7iZqE.js} +3 -3
- package/dist/chunks/{crossProjectResume-C1I0X__e.js → crossProjectResume-DK8nt_cn.js} +3 -3
- package/dist/chunks/{datadog-BzkFYNcv.js → datadog-2vPhbh6g.js} +1 -1
- package/dist/chunks/datadog-DLTYg-S2.js +1 -0
- package/dist/chunks/{desktop-oTXppB2O.js → desktop-DY9Nw2Fi.js} +1 -1
- package/dist/chunks/{diff-B23DUoT8.js → diff-Ci6rs6S6.js} +1 -1
- package/dist/chunks/{directoryCompletion-DqtWZsoW.js → directoryCompletion-DLxCFk_m.js} +1 -1
- package/dist/chunks/{doctor-o2MJvjAE.js → doctor-DBYGgS-y.js} +1 -1
- package/dist/chunks/{effort-B1X_S_oa.js → effort-Bi_t4J_o.js} +2 -2
- package/dist/chunks/{entry-BAXMpXJ0.js → entry-p_5l64_p.js} +4 -4
- package/dist/chunks/{envLessBridgeConfig-YNTOVEqU.js → envLessBridgeConfig-C_sqoGX6.js} +1 -1
- package/dist/chunks/envLessBridgeConfig-Cfbqwjew.js +1 -0
- package/dist/chunks/exit-Bc8L5oQT.js +1 -0
- package/dist/chunks/{export-CqbYdFmJ.js → export-kvnEu9Iw.js} +1 -1
- package/dist/chunks/{exportRenderer-DP_z8YD1.js → exportRenderer-DmpMgUiv.js} +1 -1
- package/dist/chunks/extra-usage-BnO6knuC.js +1 -0
- package/dist/chunks/{extra-usage-BQ5Z1wJb.js → extra-usage-CmP6V7HX.js} +1 -1
- package/dist/chunks/{extra-usage-core-B1oJoxYa.js → extra-usage-core-BqJClmf4.js} +1 -1
- package/dist/chunks/{extra-usage-noninteractive-BV_6cpdd.js → extra-usage-noninteractive-BWyPFx53.js} +1 -1
- package/dist/chunks/extraUsage-DgMspmL4.js +1 -0
- package/dist/chunks/extractMemories-uQJS_i6E.js +1 -0
- package/dist/chunks/fast-Bunl4ivM.js +1 -0
- package/dist/chunks/{fast-BJMGfO_S.js → fast-Dd2jZVF-.js} +1 -1
- package/dist/chunks/{feedback-O0Gushxg.js → feedback-8UeDx3Yc.js} +1 -1
- package/dist/chunks/{firstPartyEventLogger-0s2WJ6SR.js → firstPartyEventLogger-cKEuzfyR.js} +1 -1
- package/dist/chunks/{flushGate-CLjpgnG6.js → flushGate-B3upNVdV.js} +1 -1
- package/dist/chunks/{gates-C5y8P5t9.js → gates-lWoKqpJ1.js} +1 -1
- package/dist/chunks/gates-uo2owWkc.js +1 -0
- package/dist/chunks/{gemini-D6lfJRGH.js → gemini-DDSP4ArG.js} +1 -1
- package/dist/chunks/{generateRecap-AYujRzfu.js → generateRecap-DCBzHqag.js} +1 -1
- package/dist/chunks/{generateSessionName-CXg1uVLN.js → generateSessionName-Db5pZ3cL.js} +1 -1
- package/dist/chunks/{githubRepoPathMapping-CdjkMIX3.js → githubRepoPathMapping-v_U9b0Fe.js} +1 -1
- package/dist/chunks/{goal-BGr-SlcA.js → goal-EZCOCHZa.js} +3 -3
- package/dist/chunks/{grok-DxyRt4Jq.js → grok-H8K_fDKF.js} +1 -1
- package/dist/chunks/{growthbook-D93ZmHUL.js → growthbook-mMD0jkbu.js} +1 -1
- package/dist/chunks/{heapdump-DZz5qnZg.js → heapdump-CbVvtQuH.js} +1 -1
- package/dist/chunks/{help-C8HhaC70.js → help-Bq4jxCSJ.js} +1 -1
- package/dist/chunks/hooks-CVlFJfV0.js +1 -0
- package/dist/chunks/{hooks-De2yBPig.js → hooks-DbKUS0fN.js} +2 -2
- package/dist/chunks/{hostAdapter-CZdJUeS1.js → hostAdapter-BhVpIn1Y.js} +1 -1
- package/dist/chunks/{ide-GnSLasRI.js → ide-DZJheXyl.js} +2 -2
- package/dist/chunks/{inboundAttachments-C8y3D5mp.js → inboundAttachments-B9NxWIDx.js} +1 -1
- package/dist/chunks/inboundAttachments-_vhgWPEL.js +1 -0
- package/dist/chunks/initReplBridge-BCIaWf78.js +1 -0
- package/dist/chunks/{insights-23tyPxXV.js → insights-D1BFvhw_.js} +68 -68
- package/dist/chunks/{install-BXi4d63r.js → install-D_xm-9s1.js} +1 -1
- package/dist/chunks/{install-github-app-D2X7BgzJ.js → install-github-app-CUEACXdr.js} +2 -2
- package/dist/chunks/{install-slack-app-_J1t0kSP.js → install-slack-app-DGV6l9wy.js} +1 -1
- package/dist/chunks/{instrumentation-C9WDRy-K.js → instrumentation-CEfWNakt.js} +3 -3
- package/dist/chunks/{job-DXX7dNN_.js → job-BeeAFieV.js} +1 -1
- package/dist/chunks/{keybindings-CChhkkE0.js → keybindings-CeYhuE5G.js} +2 -2
- package/dist/chunks/{lang-COIVItM_.js → lang-BmwAsgo1.js} +1 -1
- package/dist/chunks/{language-DzWvcLCu.js → language-BcWiv2lr.js} +1 -1
- package/dist/chunks/language-BnQye2Mx.js +1 -0
- package/dist/chunks/{launchAgentsPlatform-Du_WvKeU.js → launchAgentsPlatform-DqQzwcqV.js} +1 -1
- package/dist/chunks/{launchAutofixPr-CypNniKH.js → launchAutofixPr-XltBpICW.js} +3 -3
- package/dist/chunks/{launchLocalMemory-GkqB_Gcr.js → launchLocalMemory-CHSU4_or.js} +2 -2
- package/dist/chunks/{launchLocalVault-CBihJDzq.js → launchLocalVault-CnvCdQ1M.js} +3 -3
- package/dist/chunks/{launchMemoryStores-BkK0wwq0.js → launchMemoryStores-DD2duIDU.js} +1 -1
- package/dist/chunks/{launchOnboarding-BubTG5vY.js → launchOnboarding-JTKef_jU.js} +1 -1
- package/dist/chunks/{launchSchedule-CkV6Ai-0.js → launchSchedule-BVtfNQtS.js} +1 -1
- package/dist/chunks/{launchSkillStore-DIrFg_WZ.js → launchSkillStore-TisTmZ3O.js} +1 -1
- package/dist/chunks/{launchTeleport-DFrgN9sU.js → launchTeleport-BO_V6ggj.js} +3 -3
- package/dist/chunks/{launchVault-CIiNsg91.js → launchVault-Civro2KB.js} +1 -1
- package/dist/chunks/{loadAgentsDir-DC4jN6-f.js → loadAgentsDir-BfEZacjM.js} +740 -690
- package/dist/chunks/loadAgentsDir-rYxb2igq.js +1 -0
- package/dist/chunks/loadPluginHooks-Cniyh-tZ.js +1 -0
- package/dist/chunks/localSearch-C0J7ETJQ.js +1 -0
- package/dist/chunks/{localSearch-But4wyLg.js → localSearch-COJcqOWl.js} +1 -1
- package/dist/chunks/login-B4wjtpEU.js +1 -0
- package/dist/chunks/{login-ajsn1Sg7.js → login-SuUxFLIY.js} +1 -1
- package/dist/chunks/{logoV2Utils-CpeUvaOM.js → logoV2Utils-DvjpZkyF.js} +1 -1
- package/dist/chunks/logout-o16yNWNB.js +1 -0
- package/dist/chunks/{magicDocs-TF6U6QoB.js → magicDocs-BZBrH9zB.js} +2 -2
- package/dist/chunks/{main-bjQRqaUr.js → main-p9Tke3lb.js} +90 -63
- package/dist/chunks/{mappers-Bg-xtimK.js → mappers-BcXg_fI3.js} +1 -1
- package/dist/chunks/mcp-BFxLEf3X.js +1 -0
- package/dist/chunks/{mcp-i8lqdWTr.js → mcp-CIJL0PTq.js} +2 -2
- package/dist/chunks/mcp-DfuQ1MJu.js +6 -0
- package/dist/chunks/{mcpServer-CuqaXxiJ.js → mcpServer-D2kI_m2H.js} +1 -1
- package/dist/chunks/{mcpServer-Dr9UfcEd.js → mcpServer-DPk-oJOU.js} +1 -1
- package/dist/chunks/{memory-DVJxsbcO.js → memory-CJOtY_Uv.js} +1 -1
- package/dist/chunks/{mode-C9yWWppB.js → mode-DkpKiyTE.js} +1 -1
- package/dist/chunks/{model-Dq-13vaB.js → model-DZyzd39E.js} +1 -1
- package/dist/chunks/model-De0AGQ3F.js +1 -0
- package/dist/chunks/{onChangeAppState-Cc4zOnqx.js → onChangeAppState-CvtxqUDG.js} +1 -1
- package/dist/chunks/{openai-DMCGGZts.js → openai-B888nVou.js} +3 -3
- package/dist/chunks/{overageCreditGrant-CzkWDmsQ.js → overageCreditGrant-BOSyVk3U.js} +1 -1
- package/dist/chunks/{panelCall-D36EWzwF.js → panelCall-BVdu8oii.js} +1 -1
- package/dist/chunks/{passes-CPAwB9_F.js → passes-DeSsjipz.js} +1 -1
- package/dist/chunks/{path-BE28AJwZ.js → path-Cit7LKW-.js} +1 -1
- package/dist/chunks/{paths-CEAy4QCs.js → paths-nIHVpTn2.js} +3 -3
- package/dist/chunks/permissions-DGdr-wOj.js +3 -0
- package/dist/chunks/{pipeTransport-7auNUakO.js → pipeTransport-ClZYq1sd.js} +1 -1
- package/dist/chunks/{plan-pCEs76NM.js → plan-D9bnkDwv.js} +1 -1
- package/dist/chunks/{plugin-BSC-7wQh.js → plugin-BE0r1g1g.js} +1 -1
- package/dist/chunks/{pluginAutoupdate-Cre72Rtf.js → pluginAutoupdate-xyXksEJv.js} +1 -1
- package/dist/chunks/pluginBlocklist-Dd7XBe8U.js +1 -0
- package/dist/chunks/{pluginCliCommands-CTxmCPph.js → pluginCliCommands-8MJCk1nq.js} +1 -1
- package/dist/chunks/{pluginFlagging-C5EGcjZe.js → pluginFlagging-7zuXXBD5.js} +1 -1
- package/dist/chunks/pluginOperations-DFzbASMD.js +2 -0
- package/dist/chunks/{pluginStartupCheck-B3QqfRt6.js → pluginStartupCheck-BC5npqdw.js} +1 -1
- package/dist/chunks/pluginStartupCheck-C6IH0haF.js +1 -0
- package/dist/chunks/plugins-Bhc2pbAj.js +4 -0
- package/dist/chunks/policyLimits-CfrU0rIR.js +1 -0
- package/dist/chunks/{pollConfig-CyO4Ycwc.js → pollConfig-B3hNYQ_n.js} +1 -1
- package/dist/chunks/{poor-eRoBwI0Z.js → poor-BjTGCuqc.js} +1 -1
- package/dist/chunks/{poorMode-BdNsLBQ-.js → poorMode-CGVMMLlz.js} +1 -1
- package/dist/chunks/poorMode-DWLhTldO.js +1 -0
- package/dist/chunks/{print-Ogibzjap.js → print-BJkyuCzw.js} +11 -11
- package/dist/chunks/{privacy-settings-Dd7PtKbY.js → privacy-settings-BDVjqVcX.js} +1 -1
- package/dist/chunks/processBashCommand-DnzyTwtS.js +1 -0
- package/dist/chunks/processSlashCommand-BGBRvSCA.js +6 -0
- package/dist/chunks/prompt-BXrvaHyx.js +1 -0
- package/dist/chunks/{prompt-BHI7PZe4.js → prompt-DgIuTC6Q.js} +1 -1
- package/dist/chunks/prompt-Fax-fxAf.js +1 -0
- package/dist/chunks/{promptEditor-DoJ-xPi4.js → promptEditor-BkHY_Vzb.js} +2 -2
- package/dist/chunks/{protocolHandler-Dgzu5UWb.js → protocolHandler-CrXWRkxh.js} +1 -1
- package/dist/chunks/rate-limit-options-skMSi19l.js +1 -0
- package/dist/chunks/{rcDebugLog-C0Bam8V9.js → rcDebugLog-Bv_x5w_B.js} +1 -1
- package/dist/chunks/{referral-B10JtHMk.js → referral-DfKWr4Jf.js} +1 -1
- package/dist/chunks/refresh-zosTlttX.js +1 -0
- package/dist/chunks/{registerProtocol-CQjmvg7a.js → registerProtocol-De6y1iOi.js} +1 -1
- package/dist/chunks/registry-C8JbYbJI.js +1 -0
- package/dist/chunks/{release-notes-dxng0ob_.js → release-notes-Su1UPyE4.js} +1 -1
- package/dist/chunks/{releaseNotes-CS5L5W0H.js → releaseNotes-C7-JnhrH.js} +2 -2
- package/dist/chunks/{reload-plugins-CgzAjBDp.js → reload-plugins-C8lWCq8M.js} +1 -1
- package/dist/chunks/{remote-env-BasfU8Ra.js → remote-env-tQuvJmrt.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-IJI5koHz.js → remoteBridgeCore-CwOTDmNP.js} +1 -1
- package/dist/chunks/{remoteControlServer-BBCt7ySV.js → remoteControlServer-DIKi-0lr.js} +2 -2
- package/dist/chunks/rename-Trg9EHjT.js +1 -0
- package/dist/chunks/{resume-DjnfattK.js → resume-Nt_EbjKh.js} +2 -2
- package/dist/chunks/{runtimeObserver-ByTBtmBf.js → runtimeObserver-CyWhTJpz.js} +4 -4
- package/dist/chunks/{runtimeObserver-COpkJmg-.js → runtimeObserver-T9QERJ_O.js} +1 -1
- package/dist/chunks/sandbox-adapter-BDGhDrPl.js +1 -0
- package/dist/chunks/{sandbox-toggle-CQohaYND.js → sandbox-toggle-C6v31S7-.js} +1 -1
- package/dist/chunks/searchExtraTools-C8ehknh0.js +1 -0
- package/dist/chunks/{sentry-C0bQlih_.js → sentry-CK_GHX79.js} +1 -1
- package/dist/chunks/{session-Dx_ODOHl.js → session-Ys3KvmQ0.js} +1 -1
- package/dist/chunks/{sessionDiscovery-DAqs0Ra6.js → sessionDiscovery-Cg3X2fKe.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-vthxapHk.js +1 -0
- package/dist/chunks/sessionMemory-ek1SfYG_.js +1 -0
- package/dist/chunks/sessionMemory-l-S0jpuk.js +1 -0
- package/dist/chunks/sessionMemoryUtils-BGJeJyKn.js +1 -0
- package/dist/chunks/sessionObserver-COTvvM3Z.js +1 -0
- package/dist/chunks/{sessionObserver-rd6RRTzc.js → sessionObserver-DvAdG6vQ.js} +2 -2
- package/dist/chunks/sessionStorage-GKe4ALVr.js +1 -0
- package/dist/chunks/{sessionTitle-1k_2BhFL.js → sessionTitle-DJMmUKBJ.js} +2 -2
- package/dist/chunks/{sessionTracing-DNSDPYdR.js → sessionTracing-DuQ3kbq6.js} +1 -1
- package/dist/chunks/{settingsSync-3xG2A_wN.js → settingsSync-1mhDakFG.js} +1 -1
- package/dist/chunks/{setup-Hlga8GJ_.js → setup-CAy0HkI3.js} +1 -1
- package/dist/chunks/setup-CGxUKG8x.js +3 -0
- package/dist/chunks/{setup-CY808VaY.js → setup-D5ioKRsS.js} +1 -1
- package/dist/chunks/{shadowedRuleDetection-BdBNo5eP.js → shadowedRuleDetection-Cq0y9pLR.js} +1 -1
- package/dist/chunks/{sideQuestion-DWOCUKMh.js → sideQuestion-ZII6LMSM.js} +3 -3
- package/dist/chunks/{sink-DCh0VJ4g.js → sink-Cd5g6Qqh.js} +1 -1
- package/dist/chunks/sink-Df9tds-b.js +1 -0
- package/dist/chunks/sinks-C4DwU8Xs.js +1 -0
- package/dist/chunks/{sinks-_9T2oPB_.js → sinks-DZlIEjLZ.js} +2 -2
- package/dist/chunks/{skill-learning-CzZFGFZO.js → skill-learning-DO21PjpF.js} +1 -1
- package/dist/chunks/skillChangeDetector-B6tL2yC9.js +1 -0
- package/dist/chunks/{skillGapStore-DJm3SULe.js → skillGapStore-B_xv3GUy.js} +1 -1
- package/dist/chunks/{skillGapStore-Bz_qbwI1.js → skillGapStore-CTD8MYTx.js} +2 -2
- package/dist/chunks/{skillGenerator-BcNv-VZ5.js → skillGenerator-CO9r-gft.js} +2 -2
- package/dist/chunks/skillLearning-BJS4lsNk.js +1 -0
- package/dist/chunks/skillLearning-C2NmdcYQ.js +1 -0
- package/dist/chunks/{skillPanel-Q85P-Gg4.js → skillPanel-DSumFGKN.js} +3 -3
- package/dist/chunks/{skillSearchPanel-CMCQDAcX.js → skillSearchPanel-SqkfYBjV.js} +4 -4
- package/dist/chunks/{skills-D3eUg3HG.js → skills-Bj3g5apl.js} +1 -1
- package/dist/chunks/{sprites-ChoMSqpa.js → sprites-CxMz3tIE.js} +1 -1
- package/dist/chunks/{stats-DdhEa_6-.js → stats-D1wYx84O.js} +1 -1
- package/dist/chunks/{status-CX7Kgn21.js → status-BWCqbeJ3.js} +1 -1
- package/dist/chunks/statusNoticeHelpers-DY0Cblkd.js +1 -0
- package/dist/chunks/{tag-BJ_u3aJm.js → tag-Hc7nOYm5.js} +2 -2
- package/dist/chunks/{tasks-DeEWOchP.js → tasks-BSqecqVm.js} +1 -1
- package/dist/chunks/{teamHelpers-WmWa_h3B.js → teamHelpers-BOmVFTLS.js} +1 -1
- package/dist/chunks/teamHelpers-BueGmQcw.js +1 -0
- package/dist/chunks/{teammateModeSnapshot-DZ6ulELC.js → teammateModeSnapshot-DhXjREuo.js} +1 -1
- package/dist/chunks/teammateModeSnapshot-_MCm6NGJ.js +1 -0
- package/dist/chunks/teleport-W2iPwivh.js +1 -0
- package/dist/chunks/{templateJobs-nFBp68za.js → templateJobs-1oMC9yLQ.js} +1 -1
- package/dist/chunks/{terminalSetup-DULcnnWe.js → terminalSetup-Bkml3uSP.js} +1 -1
- package/dist/chunks/{terminalSetup-BORjK3qH.js → terminalSetup-DJX1hqKs.js} +1 -1
- package/dist/chunks/{theme-Bf2QD0ja.js → theme-ia4cIc4d.js} +1 -1
- package/dist/chunks/thinkback-1NYskewu.js +1 -0
- package/dist/chunks/{thinkback-DZEhr3Ii.js → thinkback-DWLUXUQC.js} +1 -1
- package/dist/chunks/thinkback-play-DZmXMRtq.js +1 -0
- package/dist/chunks/{toolEventObserver-DMdrez6V.js → toolEventObserver-Ci0BECRu.js} +1 -1
- package/dist/chunks/{toolEventObserver-CNZy5TpN.js → toolEventObserver-nPwMQ5Vf.js} +1 -1
- package/dist/chunks/toolPool-ByCdlOak.js +1 -0
- package/dist/chunks/toolPool-IkNWjuk2.js +1 -0
- package/dist/chunks/{trustedDevice-Dw2crViN.js → trustedDevice-BynTLVs4.js} +1 -1
- package/dist/chunks/{trustedDevice-DWb5CPB_.js → trustedDevice-CtL2IGDX.js} +1 -1
- package/dist/chunks/{ultrareviewCommand-BfN25zni.js → ultrareviewCommand-DN-QhQ-f.js} +2 -2
- package/dist/chunks/undercover-CqJzV_Ar.js +1 -0
- package/dist/chunks/{undercover-rcR56jZx.js → undercover-DLr5xI3K.js} +1 -1
- package/dist/chunks/{updateCCB-DlTAqQJq.js → updateCCB-C6Ov8SNx.js} +4 -4
- package/dist/chunks/{upgrade-ClLcX7zy.js → upgrade-CVM1ffhq.js} +1 -1
- package/dist/chunks/upgrade-d40dVpDc.js +1 -0
- package/dist/chunks/{upload-BqEzK59v.js → upload-DSNwGLNd.js} +1 -1
- package/dist/chunks/{usage-BgKDh8pQ.js → usage-BRv8mBDf.js} +1 -1
- package/dist/chunks/{usage-DW-akzSR.js → usage-GMw8NiO_.js} +1 -1
- package/dist/chunks/{useMainLoopModel-BTpZ8k3k.js → useMainLoopModel-CEM_50a0.js} +1 -1
- package/dist/chunks/{useManagePlugins-z0qezP5r.js → useManagePlugins-hCqb5F5n.js} +1 -1
- package/dist/chunks/{useMergedTools-B78rAreW.js → useMergedTools-DxvRmxVF.js} +1 -1
- package/dist/chunks/{useSearchInput-CwxF3CHN.js → useSearchInput-BCErnYur.js} +1 -1
- package/dist/chunks/useSettingsErrors-BwNeCSA6.js +1 -0
- package/dist/chunks/{useVoice-X5WSnyed.js → useVoice-Cu39ifSa.js} +1 -1
- package/dist/chunks/{util-CP-_gsEO.js → util-DYuasrIE.js} +1 -1
- package/dist/chunks/utils-DSGFJaZ_.js +1 -0
- package/dist/chunks/{validatePlugin-DUuaprqR.js → validatePlugin-b1ec7M7n.js} +1 -1
- package/dist/chunks/{vim-BfmsdxOa.js → vim-CrAzv4cM.js} +1 -1
- package/dist/chunks/{voice-B3GIfFlB.js → voice-DKG3SYqi.js} +2 -2
- package/dist/chunks/{voiceModeEnabled-C1Q9j5q6.js → voiceModeEnabled-By2qa3A2.js} +1 -1
- package/dist/chunks/voiceModeEnabled-DwYcj-FH.js +1 -0
- package/dist/chunks/voiceStreamSTT-DD8ulbg1.js +1 -0
- package/dist/chunks/{voiceStreamSTT-BguyxdrW.js → voiceStreamSTT-DEV82xnN.js} +1 -1
- package/dist/chunks/{web-tools-qf_VwWRn.js → web-tools-8QRyE7va.js} +1 -1
- package/dist/chunks/windowsPaths-CRq9Bt5c.js +1 -0
- package/dist/chunks/windowsPaths-jbJ-skB_.js +1 -0
- package/dist/chunks/{workerRegistry-SbiLJIsG.js → workerRegistry-S7pO5khK.js} +1 -1
- package/dist/chunks/worktree-CfXrXsQ2.js +1 -0
- package/dist/chunks/{xml-D7-jJqSA.js → xml-CPJXOUFt.js} +1 -1
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/ApproveApiKey-Do-Qth0X.js +0 -1
- package/dist/chunks/BackgroundTasksDialog-DSeAqhMC.js +0 -2
- package/dist/chunks/ClaudeMdExternalIncludesDialog-DTZS-dek.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-UcQCmIWd.js +0 -1
- package/dist/chunks/DiffDialog-BfSnz8L-.js +0 -3
- package/dist/chunks/Doctor-BOVjkAKn.js +0 -3
- package/dist/chunks/Doctor-osWC5WVY.js +0 -1
- package/dist/chunks/Grove-DyC_Wrfx.js +0 -1
- package/dist/chunks/MCPConnectionManager-2Fulnp8q.js +0 -1
- package/dist/chunks/MessageSelector-B4jJQ-KQ.js +0 -3
- package/dist/chunks/Messages-ltcn1Qkf.js +0 -11
- package/dist/chunks/PluginSettings-DIS_qrVA.js +0 -17
- package/dist/chunks/QueryEngine-BQs519Rb.js +0 -1
- package/dist/chunks/REPL-DJh_wVWI.js +0 -1
- package/dist/chunks/ResumeConversation-BK7L_YBI.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-DVi-ggud.js +0 -1
- package/dist/chunks/SentryErrorBoundary-DLML64E_.js +0 -1
- package/dist/chunks/Settings-DOve7mW1.js +0 -2
- package/dist/chunks/api-CoBZPEi-.js +0 -1
- package/dist/chunks/asciicast-DA6TudSH.js +0 -1
- package/dist/chunks/assistant-B2_c5C4T.js +0 -1
- package/dist/chunks/auth-CRVuUNwf.js +0 -1
- package/dist/chunks/backgroundHousekeeping-BWAfdRVf.js +0 -1
- package/dist/chunks/backgroundHousekeeping-Cll7XHG1.js +0 -17
- package/dist/chunks/bridgeConfig-pVTHa_ED.js +0 -1
- package/dist/chunks/bridgeEnabled-c_BeJX3S.js +0 -1
- package/dist/chunks/bridgeMain-CHk_DCxy.js +0 -1
- package/dist/chunks/bridgeMain-DVoobI7G.js +0 -68
- package/dist/chunks/caches-3byHT6VF.js +0 -1
- package/dist/chunks/changeDetector-Cg75mKOu.js +0 -1
- package/dist/chunks/channelNotification-BSmZprUZ.js +0 -1
- package/dist/chunks/clear-CTOCrXv_.js +0 -1
- package/dist/chunks/client-BgdjJNnC.js +0 -1
- package/dist/chunks/color-BP4FmcMn.js +0 -1
- package/dist/chunks/commands-CkfOhzGE.js +0 -1
- package/dist/chunks/commitAttribution-DKvggTZx.js +0 -1
- package/dist/chunks/compact-BtAvCkY0.js +0 -3
- package/dist/chunks/context-noninteractive-DNOyQYnM.js +0 -1
- package/dist/chunks/conversation-DR4MFYYi.js +0 -1
- package/dist/chunks/conversation-DVhyJA1O.js +0 -1
- package/dist/chunks/createSession-CIM50iEU.js +0 -1
- package/dist/chunks/datadog-vQKKqB6Z.js +0 -1
- package/dist/chunks/envLessBridgeConfig-Dj0umjOo.js +0 -1
- package/dist/chunks/exit-CwGJifQF.js +0 -1
- package/dist/chunks/extra-usage-1FUBiJOE.js +0 -1
- package/dist/chunks/extraUsage-Ca_6qcke.js +0 -1
- package/dist/chunks/extractMemories-B-yrLjpP.js +0 -1
- package/dist/chunks/fast-CFtN26up.js +0 -1
- package/dist/chunks/gates-4fq2Ws2D.js +0 -1
- package/dist/chunks/hooks-CmW7bdtz.js +0 -1
- package/dist/chunks/inboundAttachments-DZiITyN8.js +0 -1
- package/dist/chunks/initReplBridge-YGXqLbNZ.js +0 -1
- package/dist/chunks/language-CiMwEWO-.js +0 -1
- package/dist/chunks/loadAgentsDir-CjhNkoq0.js +0 -1
- package/dist/chunks/loadPluginHooks-DukITDP2.js +0 -1
- package/dist/chunks/localSearch-D8FFon8N.js +0 -1
- package/dist/chunks/login-B3TV33p4.js +0 -1
- package/dist/chunks/logout-BqbTEPv9.js +0 -1
- package/dist/chunks/mcp-DtHGTZUo.js +0 -1
- package/dist/chunks/mcp-Vj0ijoSq.js +0 -6
- package/dist/chunks/model-BYSyXf9-.js +0 -1
- package/dist/chunks/permissions-B39hfy0O.js +0 -3
- package/dist/chunks/pluginBlocklist-D2Cj4TR2.js +0 -1
- package/dist/chunks/pluginOperations-DDI1CG0K.js +0 -2
- package/dist/chunks/pluginStartupCheck-DYC8CWxw.js +0 -1
- package/dist/chunks/plugins-Bz7JxD43.js +0 -4
- package/dist/chunks/policyLimits-C-oHygGe.js +0 -1
- package/dist/chunks/poorMode-D2-4vRxb.js +0 -1
- package/dist/chunks/processBashCommand-BjdUo_Na.js +0 -1
- package/dist/chunks/processSlashCommand-tetvMLMl.js +0 -6
- package/dist/chunks/prompt-DZ1EAUlC.js +0 -1
- package/dist/chunks/prompt-DeRHlPn1.js +0 -1
- package/dist/chunks/rate-limit-options-B6QH2-xn.js +0 -1
- package/dist/chunks/refresh-DmEsCaJ0.js +0 -1
- package/dist/chunks/registry-CLaXh4Gk.js +0 -1
- package/dist/chunks/rename-eEdSZsJ2.js +0 -1
- package/dist/chunks/sandbox-adapter-DagBhoTC.js +0 -1
- package/dist/chunks/searchExtraTools-kk-wV-cC.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-C-Ic-0Ry.js +0 -1
- package/dist/chunks/sessionMemory-BMtFup-Y.js +0 -1
- package/dist/chunks/sessionMemory-Bq3ECr1S.js +0 -1
- package/dist/chunks/sessionMemoryUtils-BU7N_IQG.js +0 -1
- package/dist/chunks/sessionObserver-BwAfzGUg.js +0 -1
- package/dist/chunks/sessionStorage-X2u45U9z.js +0 -1
- package/dist/chunks/setup-C2V4elOv.js +0 -3
- package/dist/chunks/sink-nZmawD5W.js +0 -1
- package/dist/chunks/sinks-BTZnXPr_.js +0 -1
- package/dist/chunks/skillChangeDetector-345QNWDp.js +0 -1
- package/dist/chunks/skillLearning-BJAfTX2G.js +0 -1
- package/dist/chunks/skillLearning-DPhuKS4j.js +0 -1
- package/dist/chunks/statusNoticeHelpers-AibXOONm.js +0 -1
- package/dist/chunks/teamHelpers-CxoQp7OY.js +0 -1
- package/dist/chunks/teammateModeSnapshot-KWxn1jxl.js +0 -1
- package/dist/chunks/teleport-CuDXJj_f.js +0 -1
- package/dist/chunks/thinkback-C1nnGg5r.js +0 -1
- package/dist/chunks/thinkback-play-BtEBESXM.js +0 -1
- package/dist/chunks/toolPool-DDj2TbY6.js +0 -1
- package/dist/chunks/toolPool-DHQyHmDY.js +0 -1
- package/dist/chunks/undercover-DSp7SB7e.js +0 -1
- package/dist/chunks/upgrade-kf1QWUo7.js +0 -1
- package/dist/chunks/useSettingsErrors-CjDaon07.js +0 -1
- package/dist/chunks/utils-CULcnflj.js +0 -1
- package/dist/chunks/voiceModeEnabled-BrA5ZhH4.js +0 -1
- package/dist/chunks/voiceStreamSTT-Dmp7Vm1S.js +0 -1
- package/dist/chunks/windowsPaths-BeDSnJ23.js +0 -2
- package/dist/chunks/windowsPaths-ttHiMKpR.js +0 -1
- package/dist/chunks/worktree-Djga1wtm.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Tn as t,wn as n}from"./src-Di342QoJ.js";import{Ct as r,cn as i}from"./state-sIHsFpDu.js";import{et as a}from"./log-DSV4Ht5l.js";import{
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Tn as t,wn as n}from"./src-Di342QoJ.js";import{Ct as r,cn as i}from"./state-sIHsFpDu.js";import{et as a}from"./log-DSV4Ht5l.js";import{Go as o,_o as s,by as c,gy as l}from"./loadAgentsDir-BfEZacjM.js";import{fn as u}from"./prompt-DgIuTC6Q.js";import{randomUUID as d}from"crypto";function f(e){return e.flatMap(e=>{if(!e)return[];switch(e.type){case`assistant`:return[{type:`assistant`,message:e.message,uuid:e.uuid,requestId:void 0,timestamp:new Date().toISOString()}];case`user`:return[{type:`user`,message:e.message,uuid:e.uuid??d(),timestamp:e.timestamp??new Date().toISOString(),isMeta:e.isSynthetic}];default:return[]}})}function p(e){let t=e.preservedSegment;return{trigger:e.trigger,pre_tokens:e.preTokens,...t&&{preserved_segment:{head_uuid:t.headUuid,anchor_uuid:t.anchorUuid,tail_uuid:t.tailUuid}}}}function m(e){let t=e,n=t.preserved_segment;return{trigger:t.trigger,preTokens:t.pre_tokens,...n&&{preservedSegment:{headUuid:n.head_uuid,anchorUuid:n.anchor_uuid,tailUuid:n.tail_uuid}}}}function h(e){return e.flatMap(e=>{if(!e)return[];switch(e.type){case`assistant`:return[{type:`assistant`,message:v(e),session_id:r(),parent_tool_use_id:null,uuid:e.uuid,error:e?.error}];case`user`:return[{type:`user`,message:e.message,session_id:r(),parent_tool_use_id:null,uuid:e.uuid,timestamp:e.timestamp,isSynthetic:e.isMeta||e.isVisibleInTranscriptOnly,...e.toolUseResult===void 0?{}:{tool_use_result:e.toolUseResult}}];case`system`:return e.subtype===`compact_boundary`&&e.compactMetadata?[{type:`system`,subtype:`compact_boundary`,session_id:r(),uuid:e.uuid,compact_metadata:p(e.compactMetadata)}]:e.subtype===`local_command`&&(e.content.includes(`<local-command-stdout>`)||e.content.includes(`<local-command-stderr>`))?[g(e.content,e.uuid)]:[];default:return[]}})}function g(e,n){let i=s({content:t(e).replace(/<local-command-stdout>([\s\S]*?)<\/local-command-stdout>/,`$1`).replace(/<local-command-stderr>([\s\S]*?)<\/local-command-stderr>/,`$1`).trim()});return{type:`assistant`,content:i.message?.content,message:i.message,parent_tool_use_id:null,session_id:r(),uuid:n}}function _(e){if(e)return{type:`rate_limit`,status:e.status,...e.resetsAt!==void 0&&{resetsAt:e.resetsAt},...e.rateLimitType!==void 0&&{rateLimitType:e.rateLimitType},...e.utilization!==void 0&&{utilization:e.utilization},...e.overageStatus!==void 0&&{overageStatus:e.overageStatus},...e.overageResetsAt!==void 0&&{overageResetsAt:e.overageResetsAt},...e.overageDisabledReason!==void 0&&{overageDisabledReason:e.overageDisabledReason},...e.isUsingOverage!==void 0&&{isUsingOverage:e.isUsingOverage},...e.surpassedThreshold!==void 0&&{surpassedThreshold:e.surpassedThreshold}}}function v(e){let t=e.message.content;if(!Array.isArray(t))return e.message;let n=t.map(e=>{if(e.type!==`tool_use`)return e;if(e.name===`ExitPlanMode`){let t=l();if(t)return{...e,input:{...e.input,plan:t}}}return e});return{...e.message,content:n}}var y=e((()=>{i(),a(),u(),n(),o(),c()}));export{p as a,f as i,y as n,h as o,g as r,_ as s,m as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{Q as i,Rn as a,T as o,b as s,f as c,g as l,h as u,nt as d,t as f,tt as p,v as m,x as h}from"./src-Di342QoJ.js";import{t as g}from"./jsx-runtime-D-D469L8.js";import{l as _,u as v}from"./debug-otxXY3j-.js";import{l as y,n as b,o as x}from"./stringUtils-KZoO4GUd.js";import{Aw as S,By as C,Dw as w,Jy as T,Ky as E,OC as D,Tw as O,XC as ee,ZC as k,dC as A,fC as j,kC as M,nw as te,pC as ne,sS as re,tw as N,vw as P}from"./loadAgentsDir-BfEZacjM.js";import{D as ie,O as ae}from"./rcDebugLog-Bv_x5w_B.js";import{t as oe}from"./useKeybinding-DPOUuymz.js";import{i as se,n as ce,r as le}from"./MCPConnectionManager-BhbT4Sah.js";import{n as ue,t as de}from"./McpParsingWarnings-B5X5HVnQ.js";import{a as fe,c as F,i as I,l as pe,n as me,o as L,r as he,s as ge,t as _e,u as R}from"./PluginSettings-NB-Wod-9.js";function ve({agentServer:e,onCancel:t,onComplete:n}){let[a]=o(),[d,f]=(0,z.useState)(!1),[g,_]=(0,z.useState)(null),[v,y]=(0,z.useState)(null),x=(0,z.useRef)(null);(0,z.useEffect)(()=>()=>x.current?.abort(),[]),p(`confirm:no`,(0,z.useCallback)(()=>{d&&(x.current?.abort(),x.current=null,f(!1),y(null))},[d]),{context:`Confirmation`,isActive:d});let S=(0,z.useCallback)(async()=>{if(!e.needsAuth||!e.url)return;f(!0),_(null);let t=new AbortController;x.current=t;try{let r={type:e.transport,url:e.url};await te(e.name,r,y,t.signal),n?.(`Authentication successful for ${e.name}. The server will connect when the agent runs.`)}catch(e){e instanceof Error&&!(e instanceof ee)&&_(e.message)}finally{f(!1),x.current=null}},[e,n]),C=b(String(e.name));if(d)return(0,B.jsxs)(h,{flexDirection:`column`,gap:1,padding:1,children:[(0,B.jsxs)(s,{color:`claude`,children:[`Authenticating with `,e.name,`…`]}),(0,B.jsxs)(h,{children:[(0,B.jsx)(E,{}),(0,B.jsx)(s,{children:` A browser window will open for authentication`})]}),v&&(0,B.jsxs)(h,{flexDirection:`column`,children:[(0,B.jsx)(s,{dimColor:!0,children:`If your browser doesn't open automatically, copy this URL manually:`}),(0,B.jsx)(i,{url:v})]}),(0,B.jsx)(h,{marginLeft:3,children:(0,B.jsxs)(s,{dimColor:!0,children:[`Return here after authenticating in your browser.`,` `,(0,B.jsx)(D,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]})})]});let w=[];return e.needsAuth&&w.push({label:e.isAuthenticated?`Re-authenticate`:`Authenticate`,value:`auth`}),w.push({label:`Back`,value:`back`}),(0,B.jsxs)(c,{title:`${C} MCP Server`,subtitle:`agent-only`,onCancel:t,inputGuide:e=>e.pending?(0,B.jsxs)(s,{children:[`Press `,e.keyName,` again to exit`]}):(0,B.jsxs)(u,{children:[(0,B.jsx)(l,{shortcut:`↑↓`,action:`navigate`}),(0,B.jsx)(l,{shortcut:`Enter`,action:`confirm`}),(0,B.jsx)(D,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}),children:[(0,B.jsxs)(h,{flexDirection:`column`,gap:0,children:[(0,B.jsxs)(h,{children:[(0,B.jsx)(s,{bold:!0,children:`Type: `}),(0,B.jsx)(s,{dimColor:!0,children:e.transport})]}),e.url&&(0,B.jsxs)(h,{children:[(0,B.jsx)(s,{bold:!0,children:`URL: `}),(0,B.jsx)(s,{dimColor:!0,children:e.url})]}),e.command&&(0,B.jsxs)(h,{children:[(0,B.jsx)(s,{bold:!0,children:`Command: `}),(0,B.jsx)(s,{dimColor:!0,children:e.command})]}),(0,B.jsxs)(h,{children:[(0,B.jsx)(s,{bold:!0,children:`Used by: `}),(0,B.jsx)(s,{dimColor:!0,children:e.sourceAgents.join(`, `)})]}),(0,B.jsxs)(h,{marginTop:1,children:[(0,B.jsx)(s,{bold:!0,children:`Status: `}),(0,B.jsxs)(s,{children:[m(`inactive`,a)(r.radioOff),` not connected (agent-only)`]})]}),e.needsAuth&&(0,B.jsxs)(h,{children:[(0,B.jsx)(s,{bold:!0,children:`Auth: `}),e.isAuthenticated?(0,B.jsxs)(s,{children:[m(`success`,a)(r.tick),` authenticated`]}):(0,B.jsxs)(s,{children:[m(`warning`,a)(r.triangleUpOutline),` may need authentication`]})]})]}),(0,B.jsx)(h,{children:(0,B.jsx)(s,{dimColor:!0,children:`This server connects only when running the agent.`})}),g&&(0,B.jsx)(h,{children:(0,B.jsxs)(s,{color:`error`,children:[`Error: `,g]})}),(0,B.jsx)(h,{children:(0,B.jsx)(re,{options:w,onChange:async e=>{switch(e){case`auth`:await S();break;case`back`:t();break}},onCancel:t})})]})}var z,B,ye=e((()=>{n(),z=t(a(),1),f(),oe(),N(),x(),M(),C(),T(),B=g()}));function V(e){switch(e){case`project`:return{label:`Project MCPs`,path:P(e)};case`user`:return{label:`User MCPs`,path:P(e)};case`local`:return{label:`Local MCPs`,path:P(e)};case`enterprise`:return{label:`Enterprise MCPs`};case`dynamic`:return{label:`Built-in MCPs`,path:`always available`};default:return{label:e}}}function be(e){let t=new Map;for(let n of e){let e=n.scope;t.has(e)||t.set(e,[]),t.get(e).push(n)}for(let[,e]of t)e.sort((e,t)=>e.name.localeCompare(t.name));return t}function xe({servers:e,agentServers:t=[],onSelectServer:n,onSelectAgentServer:a,onComplete:f}){let[p]=o(),[g,_]=(0,H.useState)(0),b=H.useMemo(()=>be(e.filter(e=>e.client.config.type!==`claudeai-proxy`)),[e]),x=H.useMemo(()=>e.filter(e=>e.client.config.type===`claudeai-proxy`).sort((e,t)=>e.name.localeCompare(t.name)),[e]),S=H.useMemo(()=>(b.get(`dynamic`)??[]).sort((e,t)=>e.name.localeCompare(t.name)),[b]),C=V(`dynamic`),w=H.useMemo(()=>{let e=[];for(let t of W){let n=b.get(t)??[];for(let t of n)e.push({type:`server`,server:t})}for(let t of x)e.push({type:`server`,server:t});for(let n of t)e.push({type:`agent-server`,agentServer:n});for(let t of S)e.push({type:`server`,server:t});return e},[b,x,t,S]),T=(0,H.useCallback)(()=>{f(`MCP dialog dismissed`,{display:`system`})},[f]);d({"confirm:previous":()=>_(e=>e===0?w.length-1:e-1),"confirm:next":()=>_(e=>e===w.length-1?0:e+1),"confirm:yes":(0,H.useCallback)(()=>{let e=w[g];e&&(e.type===`server`?n(e.server):e.type===`agent-server`&&a&&a(e.agentServer))},[w,g,n,a]),"confirm:no":T},{context:`Confirmation`});let E=e=>w.findIndex(t=>t.type===`server`&&t.server===e),O=e=>w.findIndex(t=>t.type===`agent-server`&&t.agentServer===e),ee=v(),k=e.some(e=>e.client.type===`failed`);if(e.length===0&&t.length===0)return null;let A=e=>{let t=E(e),n=g===t,i=``,a=``;if(e.client.type===`disabled`)i=m(`inactive`,p)(r.radioOff),a=`disabled`;else if(e.client.type===`connected`)i=m(`success`,p)(r.tick),a=`connected`;else if(e.client.type===`pending`){i=m(`inactive`,p)(r.radioOff);let{reconnectAttempt:t,maxReconnectAttempts:n}=e.client;a=t&&n?`reconnecting (${t}/${n})…`:`connecting…`}else e.client.type===`needs-auth`?(i=m(`warning`,p)(r.triangleUpOutline),a=`needs authentication`):(i=m(`error`,p)(r.cross),a=`failed`);return(0,U.jsxs)(h,{children:[(0,U.jsx)(s,{color:n?`suggestion`:void 0,children:n?`${r.pointer} `:` `}),(0,U.jsx)(s,{color:n?`suggestion`:void 0,children:e.name}),(0,U.jsxs)(s,{dimColor:!n,children:[` · `,i,` `]}),(0,U.jsx)(s,{dimColor:!n,children:a})]},`${e.name}-${t}`)},j=e=>{let t=O(e),n=g===t,i=e.needsAuth?m(`warning`,p)(r.triangleUpOutline):m(`inactive`,p)(r.radioOff),a=e.needsAuth?`may need auth`:`agent-only`;return(0,U.jsxs)(h,{children:[(0,U.jsx)(s,{color:n?`suggestion`:void 0,children:n?`${r.pointer} `:` `}),(0,U.jsx)(s,{color:n?`suggestion`:void 0,children:e.name}),(0,U.jsxs)(s,{dimColor:!n,children:[` · `,i,` `]}),(0,U.jsx)(s,{dimColor:!n,children:a})]},`agent-${e.name}-${t}`)},M=e.length+t.length;return(0,U.jsxs)(h,{flexDirection:`column`,children:[(0,U.jsx)(de,{}),(0,U.jsx)(c,{title:`Manage MCP servers`,subtitle:`${M} ${y(M,`server`)}`,onCancel:T,hideInputGuide:!0,children:(0,U.jsxs)(h,{flexDirection:`column`,children:[W.map(e=>{let t=b.get(e);if(!t||t.length===0)return null;let n=V(e);return(0,U.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,U.jsxs)(h,{paddingLeft:2,children:[(0,U.jsx)(s,{bold:!0,children:n.label}),n.path&&(0,U.jsxs)(s,{dimColor:!0,children:[` (`,n.path,`)`]})]}),t.map(e=>A(e))]},e)}),x.length>0&&(0,U.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,U.jsx)(h,{paddingLeft:2,children:(0,U.jsx)(s,{bold:!0,children:`claude.ai`})}),x.map(e=>A(e))]}),t.length>0&&(0,U.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,U.jsx)(h,{paddingLeft:2,children:(0,U.jsx)(s,{bold:!0,children:`Agent MCPs`})}),[...new Set(t.flatMap(e=>e.sourceAgents))].map(e=>(0,U.jsxs)(h,{flexDirection:`column`,marginTop:1,children:[(0,U.jsx)(h,{paddingLeft:2,children:(0,U.jsxs)(s,{dimColor:!0,children:[`@`,e]})}),t.filter(t=>t.sourceAgents.includes(e)).map(e=>j(e))]},e))]}),S.length>0&&(0,U.jsxs)(h,{flexDirection:`column`,marginBottom:1,children:[(0,U.jsxs)(h,{paddingLeft:2,children:[(0,U.jsx)(s,{bold:!0,children:C.label}),C.path&&(0,U.jsxs)(s,{dimColor:!0,children:[` (`,C.path,`)`]})]}),S.map(e=>A(e))]}),(0,U.jsxs)(h,{flexDirection:`column`,children:[k&&(0,U.jsx)(s,{dimColor:!0,children:ee?`※ Error logs shown inline with --debug`:`※ Run claude --debug to see error logs`}),(0,U.jsxs)(s,{dimColor:!0,children:[(0,U.jsx)(i,{url:`https://code.claude.com/docs/en/mcp`,children:`https://code.claude.com/docs/en/mcp`}),` for help`]})]})]})}),(0,U.jsx)(h,{paddingX:1,children:(0,U.jsx)(s,{dimColor:!0,italic:!0,children:(0,U.jsxs)(u,{children:[(0,U.jsx)(l,{shortcut:`↑↓`,action:`navigate`}),(0,U.jsx)(l,{shortcut:`Enter`,action:`confirm`}),(0,U.jsx)(D,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}var H,U,W,G=e((()=>{n(),H=t(a(),1),f(),oe(),S(),_(),x(),M(),ue(),U=g(),W=[`project`,`local`,`user`,`enterprise`]}));function Se({serverName:e,onComplete:t}){let[n]=o(),i=ne(),a=le(),[c,l]=(0,K.useState)(!0),[u,d]=(0,K.useState)(null);return(0,K.useEffect)(()=>{async function n(){try{if(!i.getState().mcp.clients.find(t=>t.name===e)){d(`MCP server "${e}" not found`),l(!1),t(`MCP server "${e}" not found`);return}switch((await a(e)).client.type){case`connected`:l(!1),t(`Successfully reconnected to ${e}`);break;case`needs-auth`:d(`${e} requires authentication`),l(!1),t(`${e} requires authentication. Use /mcp to authenticate.`);break;case`pending`:case`failed`:case`disabled`:d(`Failed to reconnect to ${e}`),l(!1),t(`Failed to reconnect to ${e}`);break}}catch(e){let n=e instanceof Error?e.message:String(e);d(n),l(!1),t(`Error: ${n}`)}}n()},[e,a,i,t]),c?(0,q.jsxs)(h,{flexDirection:`column`,gap:1,padding:1,children:[(0,q.jsxs)(s,{color:`text`,children:[`Reconnecting to `,(0,q.jsx)(s,{bold:!0,children:e})]}),(0,q.jsxs)(h,{children:[(0,q.jsx)(E,{}),(0,q.jsx)(s,{children:` Establishing connection to MCP server`})]})]}):u?(0,q.jsxs)(h,{flexDirection:`column`,gap:1,padding:1,children:[(0,q.jsxs)(h,{children:[(0,q.jsxs)(s,{children:[m(`error`,n)(r.cross),` `]}),(0,q.jsxs)(s,{color:`error`,children:[`Failed to reconnect to `,e]})]}),(0,q.jsxs)(s,{dimColor:!0,children:[`Error: `,u]})]}):null}var K,q,J=e((()=>{n(),K=t(a(),1),f(),ce(),A(),T(),q=g()}));function Y({onComplete:e}){let t=j(e=>e.mcp),n=j(e=>e.agentDefinitions),r=t.clients,[i,a]=X.useState({type:`list`}),[o,s]=X.useState([]),c=(0,X.useMemo)(()=>O(n.allAgents),[n.allAgents]),l=X.useMemo(()=>r.filter(e=>e.name!==`ide`).sort((e,t)=>e.name.localeCompare(t.name)),[r]);switch(X.useEffect(()=>{let e=!1;async function n(){let n=await Promise.all(l.map(async e=>{let n=e.config.scope,r=e.config.type===`sse`,i=e.config.type===`http`,a=e.config.type===`claudeai-proxy`,o;if(r||i){let n=await new k(e.name,e.config).tokens(),r=ie()!==null&&e.type===`connected`,i=e.type===`connected`&&w(t.tools,e.name).length>0;o=!!n||r||i}let s={name:e.name,client:e,scope:n};return a?{...s,transport:`claudeai-proxy`,isAuthenticated:!1,config:e.config}:r?{...s,transport:`sse`,isAuthenticated:o,config:e.config}:i?{...s,transport:`http`,isAuthenticated:o,config:e.config}:{...s,transport:`stdio`,config:e.config}}));e||s(n)}return n(),()=>{e=!0}},[l,t.tools]),(0,X.useEffect)(()=>{o.length===0&&l.length>0||o.length===0&&c.length===0&&e("No MCP servers configured. Please run /doctor if this is unexpected. Otherwise, run `claude mcp --help` or visit https://code.claude.com/docs/en/mcp to learn more.")},[o.length,l.length,c.length,e]),i.type){case`list`:return(0,Z.jsx)(xe,{servers:o,agentServers:c,onSelectServer:e=>a({type:`server-menu`,server:e}),onSelectAgentServer:e=>a({type:`agent-server-menu`,agentServer:e}),onComplete:e,defaultTab:i.defaultTab});case`server-menu`:{let n=w(t.tools,i.server.name),r=i.server.transport===`claudeai-proxy`?`claude.ai`:`Claude Code`;return i.server.transport===`stdio`?(0,Z.jsx)(ge,{server:i.server,serverToolsCount:n.length,onViewTools:()=>a({type:`server-tools`,server:i.server}),onCancel:()=>a({type:`list`,defaultTab:r}),onComplete:e}):(0,Z.jsx)(pe,{server:i.server,serverToolsCount:n.length,onViewTools:()=>a({type:`server-tools`,server:i.server}),onCancel:()=>a({type:`list`,defaultTab:r}),onComplete:e})}case`server-tools`:return(0,Z.jsx)(he,{server:i.server,onSelectTool:(e,t)=>a({type:`server-tool-detail`,server:i.server,toolIndex:t}),onBack:()=>a({type:`server-menu`,server:i.server})});case`server-tool-detail`:{let e=w(t.tools,i.server.name)[i.toolIndex];return e?(0,Z.jsx)(fe,{tool:e,server:i.server,onBack:()=>a({type:`server-tools`,server:i.server})}):(a({type:`server-tools`,server:i.server}),null)}case`agent-server-menu`:return(0,Z.jsx)(ve,{agentServer:i.agentServer,onCancel:()=>a({type:`list`,defaultTab:`Agents`}),onComplete:e})}}var X,Z,Ce=e((()=>{X=t(a(),1),N(),S(),A(),ae(),ye(),G(),R(),F(),L(),I(),Z=g()})),we=e((()=>{ye(),G(),J(),R(),Ce(),F(),L(),I()}));function Te({action:e,target:t,onComplete:n}){let r=j(e=>e.mcp.clients),i=se(),a=(0,Q.useRef)(!1);return(0,Q.useEffect)(()=>{if(a.current)return;a.current=!0;let o=e===`enable`,s=r.filter(e=>e.name!==`ide`),c=t===`all`?s.filter(e=>o?e.type===`disabled`:e.type!==`disabled`):s.filter(e=>e.name===t);if(c.length===0){n(t===`all`?`All MCP servers are already ${o?`enabled`:`disabled`}`:`MCP server "${t}" not found`);return}for(let e of c)i(e.name);n(t===`all`?`${o?`Enabled`:`Disabled`} ${c.length} MCP server(s)`:`MCP server "${t}" ${o?`enabled`:`disabled`}`)},[e,t,r,i,n]),null}async function Ee(e,t,n){if(n){let t=n.trim().split(/\s+/);if(t[0]===`no-redirect`)return(0,$.jsx)(Y,{onComplete:e});if(t[0]===`reconnect`&&t[1])return(0,$.jsx)(Se,{serverName:t.slice(1).join(` `),onComplete:e});if(t[0]===`enable`||t[0]===`disable`)return(0,$.jsx)(Te,{action:t[0],target:t.length>1?t.slice(1).join(` `):`all`,onComplete:e})}return process.env.USER_TYPE===`ant`?(0,$.jsx)(_e,{onComplete:e,args:`manage`,showMcpRedirectMessage:!0}):(0,$.jsx)(Y,{onComplete:e})}var Q,$;e((()=>{Q=t(a(),1),we(),J(),ce(),A(),me(),$=g()}))();export{Ee as call};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{B as e,M as t,d as n,n as r,t as i}from"./server-DzOdtq8A.js";import{Dr as a,Pr as o}from"./paths-
|
|
2
|
-
`).trim()||`Error`}]}}});async function
|
|
1
|
+
import{B as e,M as t,d as n,n as r,t as i}from"./server-DzOdtq8A.js";import{Dr as a,Pr as o}from"./paths-nIHVpTn2.js";import{E as s,O as c}from"./debug-otxXY3j-.js";import{o as l,s as u}from"./log-DSV4Ht5l.js";import{$u as d,G as f,Go as p,Ha as m,Jf as h,K as g,Qu as _,SD as v,Va as y,Yf as b,_o as x,gh as S,hh as C,ll as w,nO as T,tO as E,ul as D,xD as O}from"./loadAgentsDir-BfEZacjM.js";import{Qn as k,Xn as A,Zn as j}from"./prompt-DgIuTC6Q.js";import{a as M,o as N}from"./fileStateCache-BhVfo23e.js";import{n as P,t as F}from"./stdio-Cg20AQ5W.js";r(),P(),e(),v(),y(),k(),d(),T(),N(),l(),p(),o(),g(),C(),s(),b(),w();var I=[m];async function L(e,r,o){let s=M(100);S(e);let l=new i({name:`claude/tengu`,version:`2.8.3`},{capabilities:{tools:{}}});l.setRequestHandler(t,async()=>{let e=j(),t=_(e);return{tools:await Promise.all(t.map(async n=>{let r;if(n.outputSchema){let e=D(n.outputSchema);typeof e==`object`&&e&&`type`in e&&e.type===`object`&&(r=e)}return{...n,description:await n.prompt({getToolPermissionContext:async()=>e,tools:t,agents:[]}),inputSchema:D(n.inputSchema),outputSchema:r}}))}}),l.setRequestHandler(n,async({params:{name:e,arguments:t}})=>{let n=_(j()),i=A(n,e);if(!i)throw Error(`Tool ${e} not found`);let l={abortController:E(),options:{commands:I,tools:n,mainLoopModel:a(),thinkingConfig:{type:`disabled`},mcpClients:[],mcpResources:{},isNonInteractiveSession:!0,debug:r,verbose:o,agentDefinitions:{activeAgents:[],allAgents:[]}},getAppState:()=>O(),setAppState:()=>{},messages:[],readFileState:s,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:()=>{},updateAttributionState:()=>{}};try{if(!i.isEnabled())throw Error(`Tool ${e} is not enabled`);let n=await i.validateInput?.(t??{},l);if(n&&!n.result)throw Error(`Tool ${e} input is invalid: ${`message`in n?n.message:String(n)}`);let r=await i.call(t??{},l,f,x({content:[]}));return{content:[{type:`text`,text:typeof r==`string`?r:c(r.data)}]}}catch(e){return u(e),{isError:!0,content:[{type:`text`,text:(e instanceof Error?h(e):[String(e)]).filter(Boolean).join(`
|
|
2
|
+
`).trim()||`Error`}]}}});async function d(){let e=new F;await l.connect(e)}return await d()}export{L as startMCPServer};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{o as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./p-map-D7WEmnBE.js";import{Mt as r,Rn as i,T as a,b as o,f as s,g as c,h as ee,t as l,v as te,x as u}from"./src-Di342QoJ.js";import{t as d}from"./jsx-runtime-D-D469L8.js";import{Sc as f,dc as p,lc as m,yc as h}from"./paths-nIHVpTn2.js";import{K as ne,U as g}from"./debug-otxXY3j-.js";import{n as _,r as v}from"./analytics-DqMQntaB.js";import{n as y,o as b}from"./process-DMKLUQIO.js";import{i as x,o as re}from"./platform-mh9ypxS8.js";import{s as ie,u as ae}from"./types-KeqFPzY5.js";import{l as S,o as oe}from"./stringUtils-KZoO4GUd.js";import{$C as se,Aw as ce,Bw as C,EE as w,Hy as T,Iy as E,Ly as D,Nw as O,OC as k,QC as A,Rw as j,Uw as M,Vw as N,Vy as P,Zx as F,aw as I,dC as L,ew as R,kC as z,kw as B,qw as V,rS as H,rw as U,tS as W,tw as le,uC as ue,vw as G,wE as K,yw as q}from"./loadAgentsDir-BfEZacjM.js";import{n as J,t as Y}from"./exit-DOBLl8jN.js";import{stat as de}from"fs/promises";import{cwd as fe}from"process";n();var X=e(i(),1);w(),y(),l(),M(),oe(),z(),T();var Z=d();function pe({servers:e,scope:t,onDone:n}){let r=Object.keys(e),[i,l]=(0,X.useState)({});(0,X.useEffect)(()=>{j().then(({servers:e})=>l(e))},[]);let d=r.filter(e=>i[e]!==void 0);async function f(n){let r=0;for(let a of n){let n=e[a];if(n){let e=a;if(i[e]!==void 0){let t=1;for(;i[`${a}_${t}`]!==void 0;)t++;e=`${a}_${t}`}await O(e,n,t),r++}}m(r)}let[p]=a(),m=(0,X.useCallback)(e=>{b(e>0?`\n${te(`success`,p)(`Successfully imported ${e} MCP ${S(e,`server`)} to ${t} config.`)}\n`:`
|
|
2
|
+
No servers were imported.`),n(),K()},[p,t,n]),h=(0,X.useCallback)(()=>{m(0)},[m]);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(s,{title:`Import MCP Servers from Claude Desktop`,subtitle:`Found ${r.length} MCP ${S(r.length,`server`)} in Claude Desktop.`,color:`success`,onCancel:h,hideInputGuide:!0,children:[d.length>0&&(0,Z.jsx)(o,{color:`warning`,children:`Note: Some servers already exist with the same name. If selected, they will be imported with a numbered suffix.`}),(0,Z.jsx)(o,{children:`Please select the servers you want to import:`}),(0,Z.jsx)(P,{options:r.map(e=>({label:`${e}${d.includes(e)?` (already exists)`:``}`,value:e})),defaultValue:r.filter(e=>!d.includes(e)),onSubmit:f,onCancel:h,hideIndexes:!0})]}),(0,Z.jsx)(u,{paddingX:1,children:(0,Z.jsx)(o,{dimColor:!0,italic:!0,children:(0,Z.jsxs)(ee,{children:[(0,Z.jsx)(c,{shortcut:`Space`,action:`select`}),(0,Z.jsx)(c,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(k,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}l(),D(),_(),le(),H(),M(),ce(),L(),h(),g(),w(),ie(),re();async function Q(e,t){try{let n=await F(e,t);return n.type===`connected`?`✓ Connected`:n.type===`needs-auth`?`! Needs authentication`:`✗ Failed to connect`}catch{return`✗ Connection error`}}async function me({debug:e,verbose:t}){let n=fe();v(`tengu_mcp_start`,{});try{await de(n)}catch(e){throw ne(e)&&Y(`Error: Directory ${n} does not exist`),e}try{let{setup:r}=await import(`./setup-CGxUKG8x.js`);await r(n,`default`,!1,!1,void 0,!1);let{startMCPServer:i}=await import(`./mcp-CIJL0PTq.js`);await i(n,e??!1,t??!1)}catch(e){Y(`Error: Failed to start MCP server: ${e}`)}}async function he(e,t){let n=C(e),r=()=>{n&&(n.type===`sse`||n.type===`http`)&&(se(e,n),A(e,n))};try{if(t.scope){let n=q(t.scope);v(`tengu_mcp_delete`,{name:e,scope:n}),await V(e,n),r(),process.stdout.write(`Removed MCP server ${e} from ${n} config\n`),J(`File modified: ${G(n)}`)}let n=m(),i=p(),{servers:a}=N(`project`),o=!!a[e],s=[];if(n.mcpServers?.[e]&&s.push(`local`),o&&s.push(`project`),i.mcpServers?.[e]&&s.push(`user`),s.length===0)Y(`No MCP server found with name: "${e}"`);else if(s.length===1){let t=s[0];v(`tengu_mcp_delete`,{name:e,scope:t}),await V(e,t),r(),process.stdout.write(`Removed MCP server "${e}" from ${t} config\n`),J(`File modified: ${G(t)}`)}else process.stderr.write(`MCP server "${e}" exists in multiple scopes:\n`),s.forEach(e=>{process.stderr.write(` - ${B(e)} (${G(e)})\n`)}),process.stderr.write(`
|
|
3
|
+
To remove from a specific scope, use:
|
|
4
|
+
`),s.forEach(t=>{process.stderr.write(` claude mcp remove "${e}" -s ${t}\n`)}),Y()}catch(e){Y(e.message)}}async function ge(){v(`tengu_mcp_list`,{});let{servers:e}=await j();if(Object.keys(e).length===0)console.log("No MCP servers configured. Use `claude mcp add` to add a server.");else{console.log(`Checking MCP server health...
|
|
5
|
+
`);let n=await t(Object.entries(e),async([e,t])=>({name:e,server:t,status:await Q(e,t)}),{concurrency:W()});for(let{name:e,server:t,status:r}of n)if(t.type===`sse`)console.log(`${e}: ${t.url} (SSE) - ${r}`);else if(t.type===`http`)console.log(`${e}: ${t.url} (HTTP) - ${r}`);else if(t.type===`claudeai-proxy`)console.log(`${e}: ${t.url} - ${r}`);else if(!t.type||t.type===`stdio`){let n=t,i=Array.isArray(n.args)?n.args:[];console.log(`${e}: ${n.command} ${i.join(` `)} - ${r}`)}}await K(0)}async function $(e){v(`tengu_mcp_get`,{name:e});let t=C(e);t||Y(`No MCP server found with name: ${e}`),console.log(`${e}:`),console.log(` Scope: ${B(t.scope)}`);let n=await Q(e,t);if(console.log(` Status: ${n}`),t.type===`sse`){if(console.log(` Type: sse`),console.log(` URL: ${t.url}`),t.headers){console.log(` Headers:`);for(let[e,n]of Object.entries(t.headers))console.log(` ${e}: ${n}`)}if(t.oauth?.clientId||t.oauth?.callbackPort){let n=[];t.oauth.clientId&&(n.push(`client_id configured`),R(e,t)?.clientSecret&&n.push(`client_secret configured`)),t.oauth.callbackPort&&n.push(`callback_port ${t.oauth.callbackPort}`),console.log(` OAuth: ${n.join(`, `)}`)}}else if(t.type===`http`){if(console.log(` Type: http`),console.log(` URL: ${t.url}`),t.headers){console.log(` Headers:`);for(let[e,n]of Object.entries(t.headers))console.log(` ${e}: ${n}`)}if(t.oauth?.clientId||t.oauth?.callbackPort){let n=[];t.oauth.clientId&&(n.push(`client_id configured`),R(e,t)?.clientSecret&&n.push(`client_secret configured`)),t.oauth.callbackPort&&n.push(`callback_port ${t.oauth.callbackPort}`),console.log(` OAuth: ${n.join(`, `)}`)}}else if(t.type===`stdio`){console.log(` Type: stdio`),console.log(` Command: ${t.command}`);let e=Array.isArray(t.args)?t.args:[];if(console.log(` Args: ${e.join(` `)}`),t.env){console.log(` Environment:`);for(let[e,n]of Object.entries(t.env))console.log(` ${e}=${n}`)}}console.log(`\nTo remove this server, run: claude mcp remove "${e}" -s ${t.scope}`),await K(0)}async function _e(e,t,n){try{let r=q(n.scope),i=ae(t),a=n.clientSecret&&i&&typeof i==`object`&&`type`in i&&(i.type===`sse`||i.type===`http`)&&`url`in i&&typeof i.url==`string`&&`oauth`in i&&i.oauth&&typeof i.oauth==`object`&&`clientId`in i.oauth?await U():void 0;await O(e,i,r);let o=i&&typeof i==`object`&&`type`in i?String(i.type||`stdio`):`stdio`;a&&i&&typeof i==`object`&&`type`in i&&(i.type===`sse`||i.type===`http`)&&`url`in i&&typeof i.url==`string`&&I(e,{type:i.type,url:i.url},a),v(`tengu_mcp_add`,{scope:r,source:`json`,type:o}),J(`Added ${o} MCP server ${e} to ${r} config`)}catch(e){Y(e.message)}}async function ve(e){try{let t=q(e.scope);v(`tengu_mcp_add`,{scope:t,platform:x(),source:`desktop`});let{readClaudeDesktopMcpServers:n}=await import(`./claudeDesktop-BqTW_pbB.js`),i=await n();Object.keys(i).length===0&&J(`No MCP servers found in Claude Desktop configuration or configuration file does not exist.`);let{unmount:a}=await r((0,Z.jsx)(ue,{children:(0,Z.jsx)(E,{children:(0,Z.jsx)(pe,{servers:i,scope:t,onDone:()=>{a()}})})}),{exitOnCtrlC:!0})}catch(e){Y(e.message)}}async function ye(){v(`tengu_mcp_reset_mcpjson_choices`,{}),f(e=>({...e,enabledMcpjsonServers:[],disabledMcpjsonServers:[],enableAllProjectMcpServers:!1})),J(`All project-scoped (.mcp.json) server approvals and rejections have been reset.
|
|
6
|
+
You will be prompted for approval next time you start Claude Code.`)}export{ve as mcpAddFromDesktopHandler,_e as mcpAddJsonHandler,$ as mcpGetHandler,ge as mcpListHandler,he as mcpRemoveHandler,ye as mcpResetChoicesHandler,me as mcpServeHandler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{B as t,M as n}from"./server-DzOdtq8A.js";import{M as r,oc as i,yc as a,z as o}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{B as t,M as n}from"./server-DzOdtq8A.js";import{M as r,oc as i,yc as a,z as o}from"./paths-nIHVpTn2.js";import{l as s,p as c}from"./debug-otxXY3j-.js";import{r as l,t as u}from"./datadog-2vPhbh6g.js";import{i as d,r as f,t as p}from"./src-Cu58IYYb.js";import{i as m,t as h}from"./gates-lWoKqpJ1.js";import{n as g,t as _}from"./hostAdapter-BhVpIn1Y.js";import{n as v,t as y}from"./stdio-Cg20AQ5W.js";import{r as b,t as x}from"./sink-Cd5g6Qqh.js";import{homedir as S}from"os";function C(e,t){if(k.some(t=>e.startsWith(t)))return!0;if(t){let n=t.endsWith(`/`)?`${t}Applications/`:`${t}/Applications/`;if(e.startsWith(n))return!0}return!1}function w(e){return A.some(t=>t.test(e))}function T(e,t){let n=new Set;return e.map(e=>e.trim()).filter(e=>!e||e.length>N||t&&!M.test(e)||n.has(e)?!1:(n.add(e),!0)).sort((e,t)=>e.localeCompare(t))}function E(e){let t=T(e,!0);return t.length<=P?t:[...t.slice(0,P),`… and ${t.length-P} more`]}function D(e){return T(e,!1)}function O(e,t){let{alwaysKept:n,rest:r}=e.reduce((e,n)=>(j.has(n.bundleId)?e.alwaysKept.push(n.displayName):C(n.path,t)&&!w(n.displayName)&&e.rest.push(n.displayName),e),{alwaysKept:[],rest:[]}),i=D(n),a=new Set(i);return[...i,...E(r).filter(e=>!a.has(e))]}var k,A,j,M,N,P,F=e((()=>{k=[`/Applications/`,`/System/Applications/`],A=[/Helper(?:$|\s\()/,/Agent(?:$|\s\()/,/Service(?:$|\s\()/,/Uninstaller(?:$|\s\()/,/Updater(?:$|\s\()/,/^\./],j=new Set(`com.apple.Safari,com.google.Chrome,com.microsoft.edgemac,org.mozilla.firefox,company.thebrowser.Browser,com.tinyspeck.slackmacgap,us.zoom.xos,com.microsoft.teams2,com.microsoft.teams,com.apple.MobileSMS,com.apple.mail,com.microsoft.Word,com.microsoft.Excel,com.microsoft.Powerpoint,com.microsoft.Outlook,com.apple.iWork.Pages,com.apple.iWork.Numbers,com.apple.iWork.Keynote,com.google.GoogleDocs,notion.id,com.apple.Notes,md.obsidian,com.linear,com.figma.Desktop,com.microsoft.VSCode,com.apple.Terminal,com.googlecode.iterm2,com.github.GitHubDesktop,com.apple.finder,com.apple.iCal,com.apple.systempreferences`.split(`,`)),M=/^[\p{L}\p{M}\p{N}_ .&'()+-]+$/u,N=40,P=50}));async function I(){let e=_().executor.listInstalledApps(),t,n=new Promise(e=>{t=setTimeout(e,z,void 0)}),r=await Promise.race([e,n]).catch(()=>void 0).finally(()=>clearTimeout(t));if(!r){e.catch(()=>{}),c(`[Computer Use MCP] app enumeration exceeded ${z}ms or failed; tool description omits list`);return}return O(r,S())}async function L(){let e=_(),t=h(),r=f(e,t),i=await I(),a=d(e.executor.capabilities,t,i);return r.setRequestHandler(n,async()=>e.isDisabled()?{tools:[]}:{tools:a}),r}async function R(){i(),b();let e=await L(),t=new y,n=!1,r=async()=>{n||(n=!0,await Promise.all([o(),l()]),process.exit(0))};process.stdin.on(`end`,()=>void r()),process.stdin.on(`error`,()=>void r()),c(`[Computer Use MCP] Starting MCP server`),await e.connect(t),c(`[Computer Use MCP] MCP server started`)}var z;e((()=>{p(),x(),v(),t(),u(),r(),a(),s(),F(),m(),g(),z=1e3}))();export{L as createComputerUseMcpServerForCli,R as runComputerUseMcpServer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{r,t as i}from"./src-BJz1KAd_.js";import{Cc as a,Jt as o,M as s,S as c,_ as l,dc as u,oc as d,on as f,yc as p,z as m}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{r,t as i}from"./src-BJz1KAd_.js";import{Cc as a,Jt as o,M as s,S as c,_ as l,dc as u,oc as d,on as f,yc as p,z as m}from"./paths-nIHVpTn2.js";import{l as h,p as g}from"./debug-otxXY3j-.js";import{n as _,r as v}from"./analytics-DqMQntaB.js";import{B_ as y,V_ as b}from"./loadAgentsDir-BfEZacjM.js";import{r as x,t as S}from"./datadog-2vPhbh6g.js";import{c as C,i as w,o as T}from"./common-Da57Qwms.js";import{n as E,t as D}from"./stdio-Cg20AQ5W.js";import{r as O,t as k}from"./sink-Cd5g6Qqh.js";import{format as A}from"util";function j(e){return z.some(t=>t===e)}function M(){if(process.env.USER_TYPE===`ant`||l(`tengu_copper_bridge`,!1))return n(process.env.USE_LOCAL_OAUTH)||n(process.env.LOCAL_BRIDGE)?`ws://localhost:8765`:n(process.env.USE_STAGING_OAUTH)?`wss://bridge-staging.claudeusercontent.com`:`wss://bridge.claudeusercontent.com`}function N(){return n(process.env.USE_LOCAL_OAUTH)||n(process.env.LOCAL_BRIDGE)}function P(e){let t=new B,n=M();t.info(`Bridge URL: ${n??`none (using native socket)`}`);let r=e?.CLAUDE_CHROME_PERMISSION_MODE??process.env.CLAUDE_CHROME_PERMISSION_MODE,i;return r&&(j(r)?i=r:t.warn(`Invalid CLAUDE_CHROME_PERMISSION_MODE "${r}". Valid values: ${z.join(`, `)}`)),{serverName:`Claude in Chrome`,logger:t,socketPath:T(),getSocketPaths:w,clientTypeId:`claude-code`,onAuthenticationError:()=>{t.warn(`Authentication error occurred. Please ensure you are logged into the Claude browser extension with the same claude.ai account as Claude Code.`)},onToolCallDisconnected:()=>`Browser extension is not connected. Please ensure the Claude browser extension is installed and running (${I}), and that you are logged into claude.ai with the same account as Claude Code. If this is your first time connecting to Chrome, you may need to restart Chrome for the installation to take effect. If you continue to experience issues, please report a bug: ${L}`,onExtensionPaired:(e,n)=>{a(t=>t.chromeExtension?.pairedDeviceId===e&&t.chromeExtension?.pairedDeviceName===n?t:{...t,chromeExtension:{pairedDeviceId:e,pairedDeviceName:n}}),t.info(`Paired with "${n}" (${e.slice(0,8)})`)},getPersistedDeviceId:()=>u().chromeExtension?.pairedDeviceId,...n&&{bridgeConfig:{url:n,getUserId:async()=>u().oauthAccount?.accountUuid,getOAuthToken:async()=>o()?.accessToken??``,...N()&&{devUserId:`dev_user_local`}}},...i&&{initialPermissionMode:i},...process.env.USER_TYPE===`ant`&&{callAnthropicMessages:async e=>{let t=await b({model:e.model,system:e.system,messages:e.messages,max_tokens:e.max_tokens,stop_sequences:e.stop_sequences,signal:e.signal,skipSystemPromptPrefix:!0,tools:[],querySource:`chrome_mcp`}),n=[];for(let e of t.content)e.type===`text`&&n.push({type:`text`,text:e.text});return{content:n,stop_reason:t.stop_reason,usage:{input_tokens:t.usage.input_tokens,output_tokens:t.usage.output_tokens}}}},trackEvent:(e,t)=>{let n={};if(t)for(let[e,r]of Object.entries(t)){let t=e===`status`?`bridge_status`:e;(typeof r==`boolean`||typeof r==`number`||typeof r==`string`&&R.has(t))&&(n[t]=r)}v(e,n)}}}async function F(){d(),O();let e=r(P()),t=new D,n=!1,i=async()=>{n||(n=!0,await m(),await x(),process.exit(0))};process.stdin.on(`end`,()=>void i()),process.stdin.on(`error`,()=>void i()),g(`[Claude in Chrome] Starting MCP server`),await e.connect(t),g(`[Claude in Chrome] MCP server started`)}var I,L,R,z,B;e((()=>{i(),k(),E(),S(),s(),c(),_(),f(),p(),h(),t(),y(),C(),I=`https://claude.ai/chrome`,L=`https://github.com/anthropics/claude-code/issues/new?labels=bug,claude-in-chrome`,R=new Set([`bridge_status`,`error_type`,`tool_name`]),z=[`ask`,`skip_all_permission_checks`,`follow_a_plan`],B=class{silly(e,t){g(A(e,t??``),{level:`debug`})}debug(e,t){g(A(e,t??``),{level:`debug`})}info(e,t){g(A(e,t??``),{level:`info`})}warn(e,t){g(A(e,t??``),{level:`warn`})}error(e,t){g(A(e,t??``),{level:`error`})}}}))();export{P as createChromeContext,F as runClaudeInChromeMcpServer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,s as r}from"./envUtils-BWeoiL4Y.js";import{In as i,Ln as a,Q as o,Rn as s,b as c,d as l,f as u,t as d,tt as f,x as p}from"./src-Di342QoJ.js";import{t as m}from"./jsx-runtime-D-D469L8.js";import{cn as h,ot as g}from"./state-sIHsFpDu.js";import{Bc as ee,Uc as _,a as v,lo as y,n as te,oo as b,s as x}from"./paths-
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,s as r}from"./envUtils-BWeoiL4Y.js";import{In as i,Ln as a,Q as o,Rn as s,b as c,d as l,f as u,t as d,tt as f,x as p}from"./src-Di342QoJ.js";import{t as m}from"./jsx-runtime-D-D469L8.js";import{cn as h,ot as g}from"./state-sIHsFpDu.js";import{Bc as ee,Uc as _,a as v,lo as y,n as te,oo as b,s as x}from"./paths-nIHVpTn2.js";import{B as S,U as C}from"./debug-otxXY3j-.js";import{n as w,r as T}from"./analytics-DqMQntaB.js";import{n as E,t as D}from"./cwd--iizewsn.js";import{r as O,v as k}from"./git-C0IuvuIy.js";import{o as A,s as j}from"./log-DSV4Ht5l.js";import{b as M,h as ne}from"./startupProfiler-CBcN1Chw.js";import{By as N,Jn as P,Kn as re,Qk as F,Tp as ie,Yk as I,cu as L,dC as R,eA as z,fC as B,lu as ae,sS as oe,wp as se}from"./loadAgentsDir-BfEZacjM.js";import{r as ce,t as le}from"./browser-Bt-ckCaU.js";import{t as V}from"./useKeybinding-DPOUuymz.js";import{n as H,t as U}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";import{r as ue,t as de}from"./promptEditor-BkHY_Vzb.js";import{homedir as fe}from"os";import{join as W,relative as pe}from"path";import{mkdir as G,writeFile as me}from"fs/promises";function he(e){return O(e)!==null}var ge=e((()=>{k()}));function _e({onSelect:e,onCancel:t}){let r=(0,K.use)(F()),a=W(n(),`CLAUDE.md`),o=W(g(),`CLAUDE.md`),s=r.some(e=>e.path===a),u=r.some(e=>e.path===o),d=[...r.filter(e=>e.type!==`AutoMem`&&e.type!==`TeamMem`).map(e=>({...e,exists:!0})),...s?[]:[{path:a,type:`User`,content:``,exists:!1}],...u?[]:[{path:o,type:`Project`,content:``,exists:!1}]],m=new Map,h=d.map(e=>{let t=ee(e.path),n=e.exists?``:` (new)`,r=e.parent?(m.get(e.parent)??0)+1:0;m.set(e.path,r);let i=r>0?` `.repeat(r-1):``,s;s=e.type===`User`&&!e.isNested&&e.path===a?`User memory`:e.type===`Project`&&!e.isNested&&e.path===o?`Project memory`:r>0?`${i}L ${t}${n}`:`${t}`;let c,l=he(g());return c=e.type===`User`&&!e.isNested?`Saved in ~/.claude/CLAUDE.md`:e.type===`Project`&&!e.isNested&&e.path===o?`${l?`Checked in at`:`Saved in`} ./CLAUDE.md`:e.parent?`@-imported`:e.isNested?`dynamically loaded`:``,{label:s,value:e.path,description:c}}),_=[],v=B(e=>e.agentDefinitions);if(x()){_.push({label:`Open auto-memory folder`,value:`${Y}${te()}`,description:``});for(let e of v.activeAgents)if(e.memory){let t=re(e.agentType,e.memory);_.push({label:`Open ${i.bold(e.agentType)} agent memory`,value:`${Y}${t}`,description:`${e.memory} scope`})}}h.push(..._);let b=J&&h.some(e=>e.value===J)?J:h[0]?.value||``,[S,C]=(0,K.useState)(x),[w,E]=(0,K.useState)(ae),[D]=(0,K.useState)(x),O=B(e=>Object.values(e.tasks).some(e=>e.type===`dream`&&e.status===`running`)),[k,A]=(0,K.useState)(null);(0,K.useEffect)(()=>{D&&ie().then(A)},[D,O]);let j=O?`running`:k===null?``:k===0?`never`:`last ran ${ne(new Date(k))}`,[M,N]=(0,K.useState)(null),P=M!==null,I=+!!D;function L(){let e=!S;y(`userSettings`,{autoMemoryEnabled:e}),C(e),T(`tengu_auto_memory_toggled`,{enabled:e})}function R(){let e=!w;y(`userSettings`,{autoDreamEnabled:e}),E(e),T(`tengu_auto_dream_toggled`,{enabled:e})}return H(),f(`confirm:no`,t,{context:`Confirmation`}),f(`confirm:yes`,()=>{M===0?L():M===1&&R()},{context:`Confirmation`,isActive:P}),f(`select:next`,()=>{N(e=>e!==null&&e<I?e+1:null)},{context:`Select`,isActive:P}),f(`select:previous`,()=>{N(e=>e!==null&&e>0?e-1:e)},{context:`Select`,isActive:P}),(0,q.jsxs)(p,{flexDirection:`column`,width:`100%`,children:[(0,q.jsxs)(p,{flexDirection:`column`,marginBottom:1,children:[(0,q.jsx)(l,{isFocused:M===0,children:(0,q.jsxs)(c,{children:[`Auto-memory: `,S?`on`:`off`]})}),D&&(0,q.jsx)(l,{isFocused:M===1,styled:!1,children:(0,q.jsxs)(c,{color:M===1?`suggestion`:void 0,children:[`Auto-dream: `,w?`on`:`off`,j&&(0,q.jsxs)(c,{dimColor:!0,children:[` · `,j]}),!O&&w&&(0,q.jsx)(c,{dimColor:!0,children:` · /dream to run`})]})})]}),(0,q.jsx)(oe,{defaultFocusValue:b,options:h,isDisabled:P,onChange:t=>{if(t.startsWith(Y)){let e=t.slice(15);G(e,{recursive:!0}).catch(()=>{}).then(()=>ce(e));return}J=t,e(t)},onCancel:t,onUpFromFirstItem:()=>N(I)})]})}var K,q,J,Y,X=e((()=>{a(),s(),K=t(s(),1),h(),U(),d(),V(),v(),w(),L(),se(),R(),P(),le(),z(),r(),_(),M(),ge(),b(),N(),q=m(),Y=`__open_folder__`}));function ve(e){let t=fe(),n=D(),r=e.startsWith(t)?`~`+e.slice(t.length):null,i=e.startsWith(n)?`./`+pe(n,e):null;return r&&i?r.length<=i.length?r:i:r||i||e}var ye=e((()=>{s(),d(),E(),m()}));function be({onDone:e}){let t=async t=>{try{t.includes(n())&&await G(n(),{recursive:!0});try{await me(t,``,{encoding:`utf8`,flag:`wx`})}catch(e){if(S(e)!==`EEXIST`)throw e}await de(t);let r=`default`,i=``;process.env.VISUAL?(r=`$VISUAL`,i=process.env.VISUAL):process.env.EDITOR&&(r=`$EDITOR`,i=process.env.EDITOR);let a=r===`default`?``:`Using ${r}="${i}".`,o=a?`> ${a} To change editor, set $EDITOR or $VISUAL environment variable.`:`> To use a different editor, set the $EDITOR or $VISUAL environment variable.`;e(`Opened memory file at ${ve(t)}\n\n${o}`,{display:`system`})}catch(t){j(t),e(`Error opening memory file: ${t}`)}},r=()=>{e(`Cancelled memory editing`,{display:`system`})};return(0,Q.jsx)(u,{title:`Memory`,onCancel:r,color:`remember`,children:(0,Q.jsxs)(p,{flexDirection:`column`,children:[(0,Q.jsx)(Z.Suspense,{fallback:null,children:(0,Q.jsx)(_e,{onSelect:t,onCancel:r})}),(0,Q.jsx)(p,{marginTop:1,children:(0,Q.jsxs)(c,{dimColor:!0,children:[`Learn more: `,(0,Q.jsx)(o,{url:`https://code.claude.com/docs/en/memory`})]})})]})})}var Z,Q,$;e((()=>{Z=t(s(),1),d(),X(),ye(),z(),r(),C(),A(),ue(),Q=m(),$=async e=>(I(),await F(),(0,Q.jsx)(be,{onDone:e}))}))();export{$ as call};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,t as i,x as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,t as i,x as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{cS as s,gt as c,ht as l,mt as u,pt as d,sS as f}from"./loadAgentsDir-BfEZacjM.js";function p({onDone:e}){let t=l(),n=d(),i=(0,m.useMemo)(()=>t.map(e=>({label:(0,h.jsxs)(r,{children:[e.icon,` `,e.name,` `,(0,h.jsxs)(r,{dimColor:!0,children:[`(`,e.slug,`) — `,e.description]})]}),value:e.slug})),[t]);function o(n){c(n);let r=t.find(e=>e.slug===n);e(`${r?.icon} Mode switched to: ${r?.name} (${r?.slug}) — ${r?.description}`,{display:`system`})}function s(){e(`Mode selection cancelled.`,{display:`system`})}return(0,h.jsxs)(a,{flexDirection:`column`,children:[(0,h.jsxs)(a,{marginBottom:1,flexDirection:`column`,children:[(0,h.jsx)(r,{color:`remember`,bold:!0,children:`Select mode`}),(0,h.jsx)(r,{dimColor:!0,children:`Arrow keys to navigate, Enter to select, Esc to cancel.`})]}),(0,h.jsx)(f,{defaultValue:n,options:i,onChange:o,onCancel:s,visibleOptionCount:t.length})]})}var m,h,g;e((()=>{m=t(n(),1),i(),s(),u(),h=o(),g=async(e,t,n)=>{let r=n?.trim().toLowerCase();if(r){let t=l(),n=t.find(e=>e.slug===r);if(!n){e(`Unknown mode: "${r}"\n\nAvailable modes:\n${t.map(e=>`${e.icon} ${e.slug} — ${e.description}`).join(`
|
|
2
2
|
`)}`,{display:`system`});return}c(r),e(`${n.icon} Mode switched to: ${n.name} (${n.slug}) — ${n.description}`,{display:`system`});return}return(0,h.jsx)(p,{onDone:e})}}))();export{g as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{In as n,Ln as r,Rn as i}from"./src-Di342QoJ.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{$r as o,Lr as s,Pr as c,Qr as l,Si as u,Vr as d,Xr as f,Zr as p,ui as m,vi as h,wr as g,xi as _,yi as v}from"./paths-
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{In as n,Ln as r,Rn as i}from"./src-Di342QoJ.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{$r as o,Lr as s,Pr as c,Qr as l,Si as u,Vr as d,Xr as f,Zr as p,ui as m,vi as h,wr as g,xi as _,yi as v}from"./paths-nIHVpTn2.js";import{n as y,r as b}from"./analytics-DqMQntaB.js";import{A as x,et as S,j as C}from"./log-DSV4Ht5l.js";import{Bf as w,S_ as T,b_ as E,dC as D,fC as O,mC as k,x_ as A,zf as j}from"./loadAgentsDir-BfEZacjM.js";import{i as M,n as N,r as P,t as F}from"./extraUsage-DgMspmL4.js";function I({onDone:e}){let t=O(e=>e.mainLoopModel),r=O(e=>e.mainLoopModelForSession),i=O(e=>e.fastMode),a=k();function o(){b(`tengu_model_command_menu`,{action:`cancel`});let r=H(t);e(`Kept model as ${n.bold(r)}`,{display:`system`})}function c(r,o){b(`tengu_model_command_menu`,{action:r,from_model:t,to_model:r}),a(e=>({...e,mainLoopModel:r,mainLoopModelForSession:null}));let c=`Set model to ${n.bold(H(r))}`;o!==void 0&&(c+=` with ${n.bold(o)} effort`);let l;_()&&(m(),!u(r)&&i?(a(e=>({...e,fastMode:!1})),l=!1):u(r)&&v()&&i&&(c+=` · Fast mode ON`,l=!0)),N(r,l===!0,s())&&(c+=` · Billed as extra usage`),l===!1&&(c+=` · Fast mode OFF`),e(c)}return(0,W.jsx)(P,{initial:t,sessionModel:r,onSelect:c,onCancel:o,isStandaloneCommand:!0,showFastModeNotice:_()&&i&&u(t)&&v()})}function L({args:e,onDone:t}){let r=O(e=>e.fastMode),i=k(),a=e===`default`?null:e;return U.useEffect(()=>{async function e(){if(a&&!p(a)){t(`Model '${a}' is not available. Your organization restricts model selection.`,{display:`system`});return}if(a&&z(a)){t(`Opus 4.7 with 1M context is not available for your account. Learn more: https://code.claude.com/docs/en/model-config#extended-context-with-1m`,{display:`system`});return}if(a&&B(a)){t(`Sonnet 4.6 with 1M context is not available for your account. Learn more: https://code.claude.com/docs/en/model-config#extended-context-with-1m`,{display:`system`});return}if(!a){o(null);return}if(R(a)){o(a);return}try{let{valid:e,error:n}=await w(a);e?o(a):t(n||`Model '${a}' not found`,{display:`system`})}catch(e){t(`Failed to validate model: ${e.message}`,{display:`system`})}}function o(e){i(t=>({...t,mainLoopModel:e,mainLoopModelForSession:null}));let a=`Set model to ${n.bold(H(e))}`,o;_()&&(m(),!u(e)&&r?(i(e=>({...e,fastMode:!1})),o=!1):u(e)&&r&&(a+=` · Fast mode ON`,o=!0)),N(e,o===!0,s())&&(a+=` · Billed as extra usage`),o===!1&&(a+=` · Fast mode OFF`),t(a)}e()},[a,t,i]),null}function R(e){return l.includes(e.toLowerCase().trim())}function z(e){let t=e.toLowerCase();return!E()&&!s()&&t.includes(`opus`)&&t.includes(`[1m]`)}function B(e){let t=e.toLowerCase();return!A()&&(t.includes(`sonnet[1m]`)||t.includes(`sonnet-4-6[1m]`))}function V({onDone:e}){let t=O(e=>e.mainLoopModel),r=O(e=>e.mainLoopModelForSession),i=O(e=>e.effortValue),a=H(t),o=i===void 0?``:` (effort: ${i})`;return e(r?`Current model: ${n.bold(H(r))} (session override from plan mode)\nBase model: ${a}${o}`:`Current model: ${a}${o}`),null}function H(e){let t=d(e??g());return e===null?`${t} (default)`:t}var U,W,G;e((()=>{r(),U=t(i(),1),M(),S(),y(),D(),F(),h(),o(),T(),c(),f(),j(),W=a(),G=async(e,t,n)=>{if(n=n?.trim()||``,C.includes(n))return b(`tengu_model_command_inline_help`,{args:n}),(0,W.jsx)(V,{onDone:e});if(x.includes(n)){e(`Run /model to open the model selection menu, or /model [modelName] to set the model.`,{display:`system`});return}return n?(b(`tengu_model_command_inline`,{args:n}),(0,W.jsx)(L,{args:n,onDone:e})):(0,W.jsx)(I,{onDone:e})}}))();export{G as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Dr as e,Pr as t}from"./paths-nIHVpTn2.js";t();export{e as getMainLoopModel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cn as e,tr as t}from"./state-sIHsFpDu.js";import{As as n,Cc as r,It as i,Lt as a,Rt as o,Ss as s,Ts as c,dc as l,on as u,yc as d}from"./paths-
|
|
1
|
+
import{cn as e,tr as t}from"./state-sIHsFpDu.js";import{As as n,Cc as r,It as i,Lt as a,Rt as o,Ss as s,Ts as c,dc as l,on as u,yc as d}from"./paths-nIHVpTn2.js";import{J as f,U as p}from"./debug-otxXY3j-.js";import{o as m,s as h}from"./log-DSV4Ht5l.js";import{Da as g,Ta as _}from"./loadAgentsDir-BfEZacjM.js";import{d as v,m as y,p as b}from"./rcDebugLog-Bv_x5w_B.js";e(),u(),d(),p(),m(),g(),s(),v();function x(e){return t=>({...t,...typeof e.permission_mode==`string`?{toolPermissionContext:{...t.toolPermissionContext,mode:c(e.permission_mode)}}:{},...typeof e.is_ultraplan_mode==`boolean`?{isUltraplanMode:e.is_ultraplan_mode}:{}})}function S({newState:e,oldState:s}){let c=s.toolPermissionContext.mode,u=e.toolPermissionContext.mode;if(c!==u){let t=n(c),r=n(u);t!==r&&y({permission_mode:r,is_ultraplan_mode:r===`plan`&&e.isUltraplanMode&&!s.isUltraplanMode?!0:null}),b(u)}if(e.mainLoopModel!==s.mainLoopModel&&t(e.mainLoopModel),e.expandedView!==s.expandedView){let t=e.expandedView===`tasks`,n=e.expandedView===`teammates`;(l().showExpandedTodos!==t||l().showSpinnerTree!==n)&&r(e=>({...e,showExpandedTodos:t,showSpinnerTree:n}))}if(e.verbose!==s.verbose&&l().verbose!==e.verbose){let t=e.verbose;r(e=>({...e,verbose:t}))}if(process.env.USER_TYPE===`ant`&&e.tungstenPanelVisible!==s.tungstenPanelVisible&&e.tungstenPanelVisible!==void 0&&l().tungstenPanelVisible!==e.tungstenPanelVisible){let t=e.tungstenPanelVisible;r(e=>({...e,tungstenPanelVisible:t}))}if(e.settings!==s.settings)try{i(),a(),o(),e.settings.env!==s.settings.env&&_()}catch(e){h(f(e))}}export{S as n,x as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{l as t,s as n,u as r}from"./envUtils-BWeoiL4Y.js";import{ai as i,ci as a,cr as o,dr as s}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{l as t,s as n,u as r}from"./envUtils-BWeoiL4Y.js";import{ai as i,ci as a,cr as o,dr as s}from"./paths-nIHVpTn2.js";import{l as c,p as l}from"./debug-otxXY3j-.js";import{Dm as ee,G_ as u,Gb as d,Go as f,K_ as p,Oo as m,Qo as h,W_ as g,Wb as _,al as v,cE as y,es as te,fD as b,go as x,il as S,jm as C,lE as w,pD as T,q_ as E,rl as D,sE as O,st as k,ut as ne}from"./loadAgentsDir-BfEZacjM.js";import{$n as A,Qn as j,Zn as M,i as N,r as P,t as F}from"./prompt-DgIuTC6Q.js";import{F as I,I as L,L as R,P as z,R as B,Y as V}from"./rcDebugLog-Bv_x5w_B.js";import{n as H,t as U}from"./openaiShared-BkVgd2rZ.js";import{randomUUID as W}from"crypto";function G(e){return typeof e==`string`?e:Array.isArray(e)?e.map(e=>{if(!e||typeof e!=`object`)return``;let t=e;return typeof t.text==`string`?t.text:``}).filter(Boolean).join(`
|
|
2
2
|
`):``}function re(e){if(typeof e==`string`)return e;if(!Array.isArray(e))return G(e);let t=[];for(let n of e){if(!n||typeof n!=`object`)continue;let e=n;if(e.type===`text`&&typeof e.text==`string`)t.push({type:`input_text`,text:e.text});else if(e.type===`image_url`){let n=e.image_url;typeof n?.url==`string`&&t.push({type:`input_image`,image_url:n.url})}}return t.length>0?t:G(e)}function K(e){let t=[],n=[];for(let r of e){if(!r||typeof r!=`object`)continue;let e=r,i=e.role;if(i===`system`||i===`developer`){let t=G(e.content);t&&n.push(t);continue}if(i===`tool`){let n=e.tool_call_id;typeof n==`string`&&t.push({type:`function_call_output`,call_id:n,output:G(e.content)});continue}if(i===`assistant`){let n=G(e.content);n&&t.push({role:`assistant`,content:n});let r=e.tool_calls;if(Array.isArray(r))for(let e of r){if(!e||typeof e!=`object`)continue;let n=e,r=n.function,i=typeof n.id==`string`?n.id:void 0,a=typeof r?.name==`string`?r.name:void 0;!i||!a||t.push({type:`function_call`,call_id:i,name:a,arguments:typeof r?.arguments==`string`?r.arguments:`{}`})}continue}i===`user`&&t.push({role:`user`,content:re(e.content)})}return{input:t,instructions:n.length>0?n.join(`
|
|
3
3
|
|
|
4
4
|
`):void 0}}function q(e){let t=[];for(let n of e){if(!n||typeof n!=`object`)continue;let e=n.function,r=typeof e?.name==`string`?e.name:void 0;r&&t.push({type:`function`,name:r,description:typeof e?.description==`string`?e.description:``,parameters:e?.parameters&&typeof e.parameters==`object`?e.parameters:{type:`object`,properties:{}},strict:!1})}return t}function J(e){if(e===`required`)return`required`;if(e===`auto`)return`auto`;if(!e||typeof e!=`object`)return e;let t=e,n=t.function;return t.type===`function`&&typeof n?.name==`string`?{type:`function`,name:n.name}:e}function Y(e){let{input:t,instructions:n}=K(e.messages),r=q(e.tools);return{model:e.model,stream:!0,store:!1,input:t,...n?{instructions:n}:{},...r.length>0?{tools:r}:{},...e.toolChoice?{tool_choice:J(e.toolChoice)}:{},...e.reasoningEffort?{reasoning:{effort:e.reasoningEffort}}:{},parallel_tool_calls:!0}}async function*X(e){if(!e.body)throw Error(`ChatGPT response did not include a body`);let t=e.body.getReader(),n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;r+=n.decode(i,{stream:!0});let a=r.indexOf(`
|
|
@@ -6,5 +6,5 @@ import{n as e}from"./chunk-DR8-3Aex.js";import{l as t,s as n,u as r}from"./envUt
|
|
|
6
6
|
`);for(;a>=0;){let e=r.slice(0,a);r=r.slice(a+2);let t=e.split(/\r?\n/).filter(e=>e.startsWith(`data:`)).map(e=>e.slice(5).trimStart()).join(`
|
|
7
7
|
`);if(t&&t!==`[DONE]`){let e=JSON.parse(t);e&&typeof e==`object`&&(yield e)}a=r.indexOf(`
|
|
8
8
|
|
|
9
|
-
`)}}}function ie(e){let t=e?.usage,n=t?.input_tokens_details;return{input_tokens:typeof t?.input_tokens==`number`?t.input_tokens:0,output_tokens:typeof t?.output_tokens==`number`?t.output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:typeof n?.cached_tokens==`number`?n.cached_tokens:0}}function ae(e){return e?.status===`incomplete`?`max_tokens`:`end_turn`}async function*oe(e,t){let n=`msg_${W().replace(/-/g,``).slice(0,24)}`,r=new Map,i=!1,a=-1,o=!1,s=!1,c=async function*(){i||(i=!0,yield{type:`message_start`,message:{id:n,type:`message`,role:`assistant`,content:[],model:t,stop_reason:null,stop_sequence:null,usage:{input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0}}})};for await(let t of e){for await(let e of c())yield e;let e=t.type;if(e===`response.output_text.delta`){o||(s&&(yield{type:`content_block_stop`,index:a},s=!1),a++,o=!0,yield{type:`content_block_start`,index:a,content_block:{type:`text`,text:``}}),yield{type:`content_block_delta`,index:a,delta:{type:`text_delta`,text:String(t.delta??``)}};continue}if(e===`response.reasoning_text.delta`){s||(o&&(yield{type:`content_block_stop`,index:a},o=!1),a++,s=!0,yield{type:`content_block_start`,index:a,content_block:{type:`thinking`,thinking:``,signature:``}}),yield{type:`content_block_delta`,index:a,delta:{type:`thinking_delta`,thinking:String(t.delta??``)}};continue}if(e===`response.output_item.added`){let e=t.item,n=typeof t.output_index==`number`?t.output_index:-1;if(e?.type===`function_call`&&n>=0){o&&(yield{type:`content_block_stop`,index:a},o=!1),s&&(yield{type:`content_block_stop`,index:a},s=!1),a++;let t=String(e.call_id??e.id??`call_${n}`),i=String(e.name??``);r.set(n,{contentIndex:a,open:!0,name:i,id:t}),yield{type:`content_block_start`,index:a,content_block:{type:`tool_use`,id:t,name:i,input:{}}}}continue}if(e===`response.function_call_arguments.delta`){let e=typeof t.output_index==`number`?t.output_index:-1,n=r.get(e);n&&(yield{type:`content_block_delta`,index:n.contentIndex,delta:{type:`input_json_delta`,partial_json:String(t.delta??``)}});continue}if(e===`response.output_item.done`){let e=typeof t.output_index==`number`?t.output_index:-1,n=r.get(e);n?.open&&(yield{type:`content_block_stop`,index:n.contentIndex},n.open=!1);continue}if(e===`response.error`){let e=t.error;throw Error(String(e?.message??`ChatGPT Responses API error`))}if(e===`response.failed`){let e=t.response?.error;throw Error(String(e?.message??`ChatGPT Responses API failed`))}if(e===`response.completed`||e===`response.incomplete`){o&&(yield{type:`content_block_stop`,index:a},o=!1),s&&(yield{type:`content_block_stop`,index:a},s=!1);let e=t.response;yield{type:`message_delta`,delta:{stop_reason:ae(e),stop_sequence:null},usage:ie(e)},yield{type:`message_stop`}}}}async function se(e){let t=await
|
|
10
|
-
`);return i?[
|
|
9
|
+
`)}}}function ie(e){let t=e?.usage,n=t?.input_tokens_details;return{input_tokens:typeof t?.input_tokens==`number`?t.input_tokens:0,output_tokens:typeof t?.output_tokens==`number`?t.output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:typeof n?.cached_tokens==`number`?n.cached_tokens:0}}function ae(e){return e?.status===`incomplete`?`max_tokens`:`end_turn`}async function*oe(e,t){let n=`msg_${W().replace(/-/g,``).slice(0,24)}`,r=new Map,i=!1,a=-1,o=!1,s=!1,c=async function*(){i||(i=!0,yield{type:`message_start`,message:{id:n,type:`message`,role:`assistant`,content:[],model:t,stop_reason:null,stop_sequence:null,usage:{input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0}}})};for await(let t of e){for await(let e of c())yield e;let e=t.type;if(e===`response.output_text.delta`){o||(s&&(yield{type:`content_block_stop`,index:a},s=!1),a++,o=!0,yield{type:`content_block_start`,index:a,content_block:{type:`text`,text:``}}),yield{type:`content_block_delta`,index:a,delta:{type:`text_delta`,text:String(t.delta??``)}};continue}if(e===`response.reasoning_text.delta`){s||(o&&(yield{type:`content_block_stop`,index:a},o=!1),a++,s=!0,yield{type:`content_block_start`,index:a,content_block:{type:`thinking`,thinking:``,signature:``}}),yield{type:`content_block_delta`,index:a,delta:{type:`thinking_delta`,thinking:String(t.delta??``)}};continue}if(e===`response.output_item.added`){let e=t.item,n=typeof t.output_index==`number`?t.output_index:-1;if(e?.type===`function_call`&&n>=0){o&&(yield{type:`content_block_stop`,index:a},o=!1),s&&(yield{type:`content_block_stop`,index:a},s=!1),a++;let t=String(e.call_id??e.id??`call_${n}`),i=String(e.name??``);r.set(n,{contentIndex:a,open:!0,name:i,id:t}),yield{type:`content_block_start`,index:a,content_block:{type:`tool_use`,id:t,name:i,input:{}}}}continue}if(e===`response.function_call_arguments.delta`){let e=typeof t.output_index==`number`?t.output_index:-1,n=r.get(e);n&&(yield{type:`content_block_delta`,index:n.contentIndex,delta:{type:`input_json_delta`,partial_json:String(t.delta??``)}});continue}if(e===`response.output_item.done`){let e=typeof t.output_index==`number`?t.output_index:-1,n=r.get(e);n?.open&&(yield{type:`content_block_stop`,index:n.contentIndex},n.open=!1);continue}if(e===`response.error`){let e=t.error;throw Error(String(e?.message??`ChatGPT Responses API error`))}if(e===`response.failed`){let e=t.response?.error;throw Error(String(e?.message??`ChatGPT Responses API failed`))}if(e===`response.completed`||e===`response.incomplete`){o&&(yield{type:`content_block_stop`,index:a},o=!1),s&&(yield{type:`content_block_stop`,index:a},s=!1);let e=t.response;yield{type:`message_delta`,delta:{stop_reason:ae(e),stop_sequence:null},usage:ie(e)},yield{type:`message_stop`}}}}async function se(e){let t=await O(),n=e.fetchOverride??globalThis.fetch,r={Authorization:`Bearer ${t.accessToken}`,"Content-Type":`application/json`,Accept:`text/event-stream`,"OpenAI-Beta":`responses=experimental`,Origin:`https://chatgpt.com`,Referer:`https://chatgpt.com/`,originator:`claude-code-best`};t.accountId&&(r[`ChatGPT-Account-Id`]=t.accountId);let i=await n(`https://chatgpt.com/backend-api/codex/responses`,{method:`POST`,headers:r,body:JSON.stringify(e.request),signal:e.signal});if(!i.ok){let e=await i.text().catch(()=>``);throw Error(`ChatGPT Responses API request failed (${i.status})${e?`: ${e.slice(0,500)}`:``}`)}return X(i)}var ce=e((()=>{y()}));function Z(e){if(t(process.env.OPENAI_ENABLE_THINKING))return!1;if(r(process.env.OPENAI_ENABLE_THINKING))return!0;let n=e.toLowerCase();return n.includes(`deepseek`)||n.includes(`mimo`)}function le(e,t){return t??(process.env.OPENAI_MAX_TOKENS&&parseInt(process.env.OPENAI_MAX_TOKENS,10)||void 0)??(process.env.CLAUDE_CODE_MAX_OUTPUT_TOKENS&&parseInt(process.env.CLAUDE_CODE_MAX_OUTPUT_TOKENS,10)||void 0)??e}function ue(e){let{model:t,messages:n,tools:r,toolChoice:i,enableThinking:a,maxTokens:o,temperatureOverride:s}=e;return{model:t,messages:n,max_tokens:o,...r.length>0&&{tools:r,...i&&{tool_choice:i}},stream:!0,stream_options:{include_usage:!0},...a&&{thinking:{type:`enabled`},enable_thinking:!0,chat_template_kwargs:{thinking:!0,enable_thinking:!0}},...!a&&s!==void 0&&{temperature:s}}}var de=e((()=>{n()}));function Q(e){if(e===`low`)return`low`;if(e===`medium`)return`medium`;if(e===`high`)return`high`;if(e===`xhigh`||e===`max`)return`xhigh`;if(typeof e==`number`)return`high`}function fe(e){let t=process.env.CLAUDE_CODE_EFFORT_LEVEL?.toLowerCase();if(!(t===`auto`||t===`unset`))return Q(t)??Q(e)??`medium`}function pe(e,t,n,r){if(!r||S())return e;let i=t.filter(e=>n.has(e.name)).map(F).sort().join(`
|
|
10
|
+
`);return i?[m({content:`<available-deferred-tools>\n${i}\n</available-deferred-tools>`,isMeta:!0}),...e]:e}function me(e){return e.type===`assistant`||e.type===`user`}function $(e){let{partialMessage:t,contentBlocks:n,tools:r,agentId:i,usage:a,stopReason:o,maxTokens:s}=e,c=[],l=Object.keys(n).sort((e,t)=>Number(e)-Number(t)).map(e=>n[Number(e)]).filter(Boolean);return l.length>0&&t&&c.push({message:{...t,content:h(l,r,i),usage:a,stop_reason:o,stop_sequence:null},requestId:void 0,type:`assistant`,uuid:W(),timestamp:new Date().toISOString()}),o===`max_tokens`&&c.push(x({content:`Output truncated: response exceeded the ${s} token limit. Set OPENAI_MAX_TOKENS or CLAUDE_CODE_MAX_OUTPUT_TOKENS to override.`,apiError:`max_output_tokens`,error:`max_output_tokens`})),c}async function*he(e,t,n,r,a){try{let s=V(a.model),c=te(e,n),d=await v(a.model,n,a.getToolPermissionContext||(async()=>M()),a.agents||[],a.querySource),f=new Set;if(d)for(let e of n)N(e)&&f.add(e.name);let m=n;d&&f.size>0&&(m=n.filter(e=>!!(!f.has(e.name)||A(e,`SearchExtraTools`))));let h=await Promise.all(m.map(e=>ne(e,{getToolPermissionContext:a.getToolPermissionContext,tools:n,agents:a.agents,allowedAgentTypes:a.allowedAgentTypes,model:a.model,deferLoading:d&&f.has(e.name)}))),y=h.filter(e=>{let t=e;return t.type!==`advisor_20260301`&&t.type!==`computer_20250124`}),b=Z(s),x=B(pe(c.filter(me),n,f,d),t,{enableThinking:b}),S=R(y),C=L(a.toolChoice),E=fe(a.effortValue);if(d){let e=m.filter(e=>f.has(e.name)).length;l(`[OpenAI] Tool search enabled: ${e}/${f.size} deferred tools included, total tools=${S.length}`)}else l(`[OpenAI] Tool search disabled, total tools=${S.length}`);let{upperLimit:D}=o(s),O=le(D,a.maxOutputTokensOverride);l(`[OpenAI] Calling model=${s}, messages=${x.length}, tools=${S.length}, thinking=${b}`);let k=w()?oe(await se({request:Y({model:s,messages:x,tools:S,toolChoice:C,reasoningEffort:E}),signal:r,fetchOverride:a.fetchOverride}),s):I(await _({maxRetries:0,fetchOverride:a.fetchOverride,source:a.querySource}).chat.completions.create(ue({model:s,messages:x,tools:S,toolChoice:C,enableThinking:b,maxTokens:O,temperatureOverride:a.temperatureOverride}),{signal:r}),s),j={},P=[],F=null,z=null,U={input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0},W=0,G=Date.now();for await(let e of k){switch(e.type){case`message_start`:F=e.message,W=Date.now()-G,e.message.usage&&(U={...U,...e.message.usage});break;case`content_block_start`:{let t=e.index,n=e.content_block;n.type===`tool_use`?j[t]={...n,input:``}:n.type===`text`?j[t]={...n,text:``}:n.type===`thinking`?j[t]={...n,thinking:``,signature:``}:j[t]={...n};break}case`content_block_delta`:{let t=e.index,n=e.delta,r=j[t];if(!r)break;n.type===`text_delta`?r.text=(r.text||``)+n.text:n.type===`input_json_delta`?r.input=(r.input||``)+n.partial_json:n.type===`thinking_delta`?r.thinking=(r.thinking||``)+n.thinking:n.type===`signature_delta`&&(r.signature=n.signature);break}case`content_block_stop`:break;case`message_delta`:{let t=e.usage;t&&(U=H(U,t)),e.delta.stop_reason!=null&&(z=e.delta.stop_reason);break}case`message_stop`:if(F){for(let e of $({partialMessage:F,contentBlocks:j,tools:n,agentId:a.agentId,usage:U,stopReason:z,maxTokens:O}))e.type===`assistant`&&P.push(e),yield e;F=null}U.input_tokens+U.output_tokens>0&&ee(i(s,U),U,a.model);break}yield{type:`stream_event`,event:e,...e.type===`message_start`?{ttftMs:W}:void 0}}if(T(a.langfuseTrace??null,{model:s,provider:`openai`,input:g(x),output:u(P),usage:{input_tokens:U.input_tokens,output_tokens:U.output_tokens,cache_creation_input_tokens:U.cache_creation_input_tokens,cache_read_input_tokens:U.cache_read_input_tokens},startTime:new Date(G),endTime:new Date,completionStartTime:W>0?new Date(G+W):void 0,tools:p(h),...b&&{thinking:{type:`enabled`}}}),F)for(let e of $({partialMessage:F,contentBlocks:j,tools:n,agentId:a.agentId,usage:U,stopReason:z,maxTokens:O}))yield e}catch(e){let t=e instanceof Error?e.message:String(e);l(`[OpenAI] Error: ${t}`,{level:`error`}),yield x({content:`API Error: ${t}`,apiError:`api_error`,error:e instanceof Error?e:Error(String(e))})}}e((()=>{d(),U(),z(),y(),ce(),f(),k(),j(),c(),C(),a(),de(),b(),E(),s(),D(),P()}))();export{he as queryModelOpenAI};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Cc as r,Zt as i,dc as a,on as o,yc as s}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Cc as r,Zt as i,dc as a,on as o,yc as s}from"./paths-nIHVpTn2.js";import{l as c,u as l}from"./oauth-CdZEzMww.js";import{d as u,f as d,o as f,s as p}from"./log-DSV4Ht5l.js";import{a as m,l as h,o as g}from"./api-C-KY7A3r.js";async function _(){try{let{accessToken:e,orgUUID:n}=await h(),r=`${c().BASE_API_URL}/api/oauth/organizations/${n}/overage_credit_grant`;return(await t.get(r,{headers:m(e)})).data}catch(e){return p(e),null}}function v(){let e=i()?.organizationUuid;if(!e)return null;let t=a().overageCreditGrantCache?.[e];return!t||Date.now()-t.timestamp>S?null:t.info}function y(){let e=i()?.organizationUuid;if(!e)return;let t=a().overageCreditGrantCache;!t||!(e in t)||r(t=>{let n={...t.overageCreditGrantCache};return delete n[e],{...t,overageCreditGrantCache:n}})}async function b(){if(d())return;let e=i()?.organizationUuid;if(!e)return;let t=await _();t&&r(n=>{let r=n.overageCreditGrantCache?.[e],i=r?.info,a=i&&i.available===t.available&&i.eligible===t.eligible&&i.granted===t.granted&&i.amount_minor_units===t.amount_minor_units&&i.currency===t.currency;if(a&&r&&Date.now()-r.timestamp<=S)return n;let o={info:a?i:t,timestamp:Date.now()};return{...n,overageCreditGrantCache:{...n.overageCreditGrantCache,[e]:o}}})}function x(e){if(e.amount_minor_units==null||!e.currency)return null;if(e.currency.toUpperCase()===`USD`){let t=e.amount_minor_units/100;return Number.isInteger(t)?`$${t}`:`$${t.toFixed(2)}`}return null}var S,C=e((()=>{n(),l(),o(),s(),f(),u(),g(),S=3600*1e3}));export{b as a,y as i,v as n,C as r,x as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{B as n,Rn as r,b as i,f as a,t as o,x as s,xt as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{B as n,Rn as r,b as i,f as a,t as o,x as s,xt as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{nd as u,rd as d}from"./loadAgentsDir-BfEZacjM.js";import{n as f,t as p}from"./SentryErrorBoundary-D5niZGEU.js";function m(e){return e.status===`running`?{mark:`●`,color:`warning`}:e.resultKind===`dead`?{mark:`✗`,color:`error`}:{mark:`✓`,color:`success`}}function h(e){return e?e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e):`0`}function g(e){let t=[];return e.model&&t.push(e.model),t.push(`${h(e.tokenCount)} tok`),t.push(`${e.toolCount??0} tool`),t.join(` · `)}var _,v,y,b,x,S=e((()=>{_={running:`●`,completed:`✓`,failed:`✗`,killed:`■`},v={running:`warning`,completed:`success`,failed:`error`,killed:`subtle`},y={running:`running`,completed:`done`,failed:`failed`,killed:`killed`},b={running:`●`,done:`✓`,pending:`○`},x={running:`warning`,done:`success`,pending:`subtle`}}));function C(e,t){if(e.length<=t)return e;let n=e.match(/#\d+$/);if(!n)return e.slice(0,t);let r=n[0],i=e.slice(0,e.length-r.length),a=t-r.length-1;return`${i.slice(0,a)}…${r}`}function ee({agents:e,selectedIndex:t,focused:r}){let[a,o]=n(E),c=T[Math.floor(o/E)%T.length];return e.length===0?(0,w.jsx)(i,{color:`subtle`,children:`(no agents in this phase)`}):(0,w.jsx)(s,{ref:a,flexDirection:`column`,children:e.map((e,n)=>{let a=m(e),o=n===t&&r,l=e.status===`running`?c:a.mark,u=C(e.label??`agent-${e.id}`,D);return(0,w.jsxs)(s,{backgroundColor:o?`selectionBg`:void 0,justifyContent:`space-between`,children:[(0,w.jsxs)(s,{children:[(0,w.jsx)(i,{color:a.color,children:l}),(0,w.jsxs)(i,{children:[` `,u]})]}),(0,w.jsx)(i,{color:`subtle`,children:g(e)})]},e.id)})})}var w,T,E,D,O=e((()=>{r(),o(),S(),w=l(),T=[`·`,`✢`,`✱`,`✶`,`✻`,`✽`],E=120,D=18}));function k(e,t){return e?.status===`done`?`done`:t.length>0?t.every(e=>e.status===`done`)?`done`:`running`:e?.status===`running`?`running`:`pending`}function A(e){let t=new Map(e.phases.map(e=>[e.title,e])),n=new Set,r=[],i=i=>{if(n.has(i))return;n.add(i);let a=t.get(i),o=e.agents.filter(e=>e.phase===i);r.push({title:i,status:k(a,o),done:o.filter(e=>e.status===`done`).length,total:o.length})};for(let t of e.declaredPhases)i(t);for(let t of e.phases)i(t.title);for(let t of e.agents)t.phase&&i(t.phase);return r}function j(e,t){return t===void 0||t===`All`?e:e.filter(e=>e.phase===t)}function M(e){return e.filter(e=>e.status===`running`)}function N(e,t){let n=Math.max(0,Math.trunc(t)),r=e.slice(0,n);return{runs:r,overflow:Math.max(0,e.length-r.length)}}function P(e,t){return`${e}#${t.slice(-4)}`}function F(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60),r=t%60;return n<60?`${n}m${String(r).padStart(2,`0`)}s`:`${Math.floor(n/60)}h${String(n%60).padStart(2,`0`)}m`}var I=e((()=>{}));function L({phases:e,agents:t,selectedIndex:r,focused:a}){let[o,c]=n(B),l=z[Math.floor(c/B)%z.length],u=t.length;return(0,R.jsx)(s,{ref:o,flexDirection:`column`,children:[{title:`All`,done:t.filter(e=>e.status===`done`).length,total:u},...e].map((e,t)=>{let n=t===r,o=n&&a,c=e.status===`running`?l:e.status?b[e.status]:` `,u=e.status?x[e.status]:`subtle`;return(0,R.jsxs)(s,{backgroundColor:o?`selectionBg`:void 0,justifyContent:`space-between`,children:[(0,R.jsxs)(s,{children:[(0,R.jsx)(i,{color:n?`claude`:void 0,children:o?`>`:` `}),(0,R.jsx)(i,{children:` `}),(0,R.jsx)(i,{color:u,children:c}),(0,R.jsxs)(i,{children:[` `,e.title]})]}),(0,R.jsxs)(i,{color:`subtle`,children:[e.done,`/`,e.total]})]},e.title)})})}var R,z,B,V=e((()=>{r(),o(),S(),I(),R=l(),z=[`·`,`✢`,`✱`,`✶`,`✻`,`✽`],B=120}));function H({runs:e,activeRunId:t}){if(e.length===0)return(0,U.jsx)(i,{color:`subtle`,children:`(no runs)`});let{runs:n,overflow:r}=N(e,G);return(0,U.jsxs)(s,{children:[n.map(e=>{let n=e.runId===t,r=C(P(e.workflowName,e.runId),W),a=`═`.repeat(r.length+2);return(0,U.jsxs)(s,{flexDirection:`column`,marginRight:2,children:[(0,U.jsxs)(s,{children:[(0,U.jsx)(i,{color:v[e.status],children:_[e.status]}),(0,U.jsx)(i,{children:` `}),(0,U.jsx)(i,{color:n?`claude`:void 0,bold:n,children:r})]}),(0,U.jsx)(i,{color:n?`claude`:void 0,children:n?a:``})]},e.runId)}),r>0?(0,U.jsxs)(s,{flexDirection:`column`,marginRight:2,children:[(0,U.jsxs)(i,{color:`subtle`,children:[`+`,r]}),(0,U.jsx)(i,{children:` `})]}):null]})}var U,W,G,K=e((()=>{r(),o(),S(),I(),O(),U=l(),W=18,G=6}));function q(e,t,n=`normal`){return n===`confirm`?e===`y`||e===`Y`||t.return?`confirmYes`:e===`n`||e===`N`||t.escape||e===`q`?`confirmNo`:null:t.tab||e===` `?t.shift?`prevTab`:`nextTab`:t.escape||e===`q`?`quit`:e===`K`?`killWorkflow`:e===`x`?`killAgent`:e===`r`?`resume`:e===`n`?`newRun`:t.leftArrow?`focusLeft`:t.rightArrow?`focusRight`:t.upArrow?`moveUp`:t.downArrow?`moveDown`:null}function J(e,t=`normal`){c((n,r)=>{let i=q(n,r,t);if(i!==null)switch(i){case`nextTab`:e.nextTab();break;case`prevTab`:e.prevTab();break;case`focusLeft`:e.focusLeft();break;case`focusRight`:e.focusRight();break;case`moveUp`:e.moveUp();break;case`moveDown`:e.moveDown();break;case`killAgent`:e.killAgent();break;case`killWorkflow`:e.killWorkflow();break;case`resume`:e.resumeFocused();break;case`newRun`:e.newRun();break;case`quit`:e.quit();break;case`confirmYes`:e.confirmYes();break;case`confirmNo`:e.confirmNo();break}})}var te=e((()=>{o()}));function Y(e,t){if(t===0)return 0;let n=Math.trunc(e);return Number.isNaN(n)||n<0?0:Math.min(n,t-1)}function ne(e,t){return!e||!t||e.runId!==t.runId||e.status!==`running`?!1:t.status===`completed`||t.status===`failed`||t.status===`killed`}function re({onDone:e,context:t}){let r=u(),o=(0,X.useSyncExternalStore)(r.subscribe,()=>r.listRuns(),()=>[]),c=M(o),[l,d]=(0,X.useState)(null),[f,p]=(0,X.useState)(`phases`),[m,h]=(0,X.useState)(0),[g,_]=(0,X.useState)(0),[b,x]=(0,X.useState)(null);(0,X.useEffect)(()=>{r.loadPersistedRuns()},[r]),(0,X.useEffect)(()=>{if(c.length===0){l!==null&&d(null);return}c.some(e=>e.runId===l)||d(c[0].runId)},[c,l]);let S=c.find(e=>e.runId===l),C=S?A(S):[],w=C.length+1,T=Y(m,w),E=(0,X.useRef)(null);(0,X.useEffect)(()=>{let t=S?{runId:S.runId,status:S.status}:null,n=E.current;if(E.current=t,!ne(n,t))return;let r=setTimeout(()=>e(),800);return()=>{clearTimeout(r)}},[S?.runId,S?.status,e]);let D=T===0?void 0:C[T-1]?.title,O=S?j(S.agents,D):[],k=Y(g,O.length),N=e=>{d(e),p(`phases`),h(0),_(0)};J({nextTab:()=>{if(c.length===0)return;let e=c[(c.findIndex(e=>e.runId===l)+1)%c.length];N(e.runId)},prevTab:()=>{if(c.length===0)return;let e=c[(c.findIndex(e=>e.runId===l)-1+c.length)%c.length];N(e.runId)},focusLeft:()=>p(`phases`),focusRight:()=>p(`agents`),moveUp:()=>{f===`phases`?h(e=>Y(e-1,w)):_(e=>Y(e-1,O.length))},moveDown:()=>{f===`phases`?h(e=>Y(e+1,w)):_(e=>Y(e+1,O.length))},killAgent:()=>{f!==`agents`||!S||O[k]&&x(`agent`)},killWorkflow:()=>{S&&x(`workflow`)},resumeFocused:()=>{if(!S)return;let n=t.canUseTool;if(!n){e(`resume needs canUseTool context; run /<name> resume from the main session.`);return}r.launch({resumeFromRunId:S.runId,name:S.workflowName},t,n).catch(t=>e(`resume failed: ${t.message}`))},newRun:()=>e(`Tip: start a named workflow with /<name>, or pass name via the Workflow tool.`),quit:()=>{if(b!==null){x(null);return}e()},confirmYes:()=>{if(b===`workflow`&&S){r.kill(S.runId),x(null),e();return}else if(b===`agent`&&S){let e=O[k];e&&r.killAgent(S.runId,e.id)}x(null)},confirmNo:()=>x(null)},b===null?`normal`:`confirm`);let P=o.filter(e=>e.status===`running`).length,I=o.length-P,R=D??`All`,z=S?S.agents.filter(e=>e.status===`done`).length:0,[B]=n(1e3),V=S?Date.now()-S.startedAt:0;return(0,Z.jsxs)(s,{ref:B,flexDirection:`column`,borderStyle:`round`,borderColor:`claude`,paddingX:1,children:[(0,Z.jsxs)(s,{justifyContent:`space-between`,children:[(0,Z.jsx)(i,{bold:!0,children:S?.workflowName??`Workflows`}),S?(0,Z.jsxs)(i,{color:`subtle`,children:[z,`/`,S.agentCount,` agents · `,F(V),` ·`,` `,(0,Z.jsx)(i,{color:v[S.status],children:y[S.status]})]}):(0,Z.jsxs)(i,{color:`subtle`,children:[P,` running · `,I,` done`]})]}),S?.description?(0,Z.jsx)(i,{color:`subtle`,children:S.description}):null,c.length>1?(0,Z.jsx)(s,{marginTop:1,children:(0,Z.jsx)(H,{runs:c,activeRunId:l})}):null,(0,Z.jsxs)(s,{flexDirection:`row`,marginTop:1,children:[(0,Z.jsxs)(s,{width:`25%`,flexDirection:`column`,children:[(0,Z.jsx)(i,{color:f===`phases`?`claude`:`subtle`,bold:!0,children:`Phases`}),(0,Z.jsx)(L,{phases:C,agents:S?.agents??[],selectedIndex:T,focused:f===`phases`})]}),(0,Z.jsx)(i,{color:`subtle`,children:`│`}),(0,Z.jsxs)(s,{flexGrow:1,flexDirection:`column`,children:[(0,Z.jsxs)(i,{color:f===`agents`?`claude`:`subtle`,bold:!0,children:[R,` · `,O.length,` agents`]}),(0,Z.jsx)(ee,{agents:O,selectedIndex:k,focused:f===`agents`})]})]}),(0,Z.jsx)(s,{marginTop:1,children:(0,Z.jsx)(i,{color:`subtle`,children:b===null?`Tab switch run · ←/→ focus · ↑/↓ move · x kill agent · K kill workflow · r resume · q quit`:`Confirm: y kill · n/Esc cancel`})}),b===null?null:(0,Z.jsx)(a,{title:b===`workflow`?`Kill workflow "${S?.workflowName??``}"?`:`Kill agent "${O[k]?.label??``}"?`,subtitle:b===`workflow`?`All in-flight agents will be aborted. Resume will replay from journal.`:`Only this agent aborts; other agents in the workflow keep running.`,onCancel:()=>x(null),color:`warning`,children:(0,Z.jsx)(i,{color:`subtle`,children:`Press y to confirm, or n/Esc to cancel.`})})]})}var X,Z,ie=e((()=>{X=t(r(),1),o(),d(),O(),V(),K(),S(),te(),I(),Z=l()})),Q,$;e((()=>{f(),ie(),Q=l(),$=async(e,t,n)=>(0,Q.jsx)(p,{name:`WorkflowsPanel`,children:(0,Q.jsx)(re,{onDone:e,context:t})})}))();export{$ as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Q as n,Rn as r,b as i,p as a,t as o,tn as s,tt as c,x as l,xt as u}from"./src-Di342QoJ.js";import{t as d}from"./jsx-runtime-D-D469L8.js";import{Cc as f,Ps as p,dc as m,yc as h}from"./paths-
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Q as n,Rn as r,b as i,p as a,t as o,tn as s,tt as c,x as l,xt as u}from"./src-Di342QoJ.js";import{t as d}from"./jsx-runtime-D-D469L8.js";import{Cc as f,Ps as p,dc as m,yc as h}from"./paths-nIHVpTn2.js";import{n as g,r as _}from"./analytics-DqMQntaB.js";import{o as v,s as y}from"./log-DSV4Ht5l.js";import{b,x}from"./teammate-CbskW5G9.js";import{t as S}from"./useKeybinding-DPOUuymz.js";import{n as C,t as w}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";import{i as T,n as E,o as D,r as O,s as k}from"./referral-DfKWr4Jf.js";function A({onDone:e}){let[t,r]=(0,j.useState)(!0),[o,d]=(0,j.useState)([]),[f,p]=(0,j.useState)(!1),[m,h]=(0,j.useState)(null),[g,v]=(0,j.useState)(void 0),x=C(()=>e(`Guest passes dialog dismissed`,{display:`system`}));if(c(`confirm:no`,(0,j.useCallback)(()=>{e(`Guest passes dialog dismissed`,{display:`system`})},[e]),{context:`Confirmation`}),u((t,n)=>{n.return&&m&&s(m).then(t=>{t&&process.stdout.write(t),_(`tengu_guest_passes_link_copied`,{}),e(`Referral link copied to clipboard!`)})}),(0,j.useEffect)(()=>{async function e(){try{let e=await T();if(!e||!e.eligible){p(!1),r(!1);return}p(!0),e.referral_code_details?.referral_link&&h(e.referral_code_details.referral_link),v(e.referrer_reward);let t=e.referral_code_details?.campaign??`claude_code_guest_pass`,n;try{n=await E(t)}catch(e){y(e),p(!1),r(!1);return}let i=n.redemptions||[],a=n.limit||3,o=[];for(let e=0;e<a;e++){let t=i[e];o.push({passNumber:e+1,isAvailable:!t})}d(o),r(!1)}catch(e){y(e),p(!1),r(!1)}}e()},[]),t)return(0,M.jsx)(a,{children:(0,M.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,M.jsx)(i,{dimColor:!0,children:`Loading guest pass information…`}),(0,M.jsx)(i,{dimColor:!0,italic:!0,children:x.pending?(0,M.jsxs)(M.Fragment,{children:[`Press `,x.keyName,` again to exit`]}):(0,M.jsx)(M.Fragment,{children:`Esc to cancel`})})]})});if(!f)return(0,M.jsx)(a,{children:(0,M.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,M.jsx)(i,{children:`Guest passes are not currently available.`}),(0,M.jsx)(i,{dimColor:!0,italic:!0,children:x.pending?(0,M.jsxs)(M.Fragment,{children:[`Press `,x.keyName,` again to exit`]}):(0,M.jsx)(M.Fragment,{children:`Esc to cancel`})})]})});let S=b(o,e=>e.isAvailable),w=[...o].sort((e,t)=>t.isAvailable-+e.isAvailable),D=e=>e.isAvailable?(0,M.jsxs)(l,{flexDirection:`column`,marginRight:1,children:[(0,M.jsx)(i,{children:`┌──────────┐`}),(0,M.jsxs)(i,{children:[` ) CC `,(0,M.jsx)(i,{color:`claude`,children:`✻`}),` ┊ ( `]}),(0,M.jsx)(i,{children:`└──────────┘`})]},e.passNumber):(0,M.jsxs)(l,{flexDirection:`column`,marginRight:1,children:[(0,M.jsx)(i,{dimColor:!0,children:`┌─────────╱`}),(0,M.jsx)(i,{dimColor:!0,children:` ) CC ✻ ┊╱`}),(0,M.jsx)(i,{dimColor:!0,children:`└───────╱`})]},e.passNumber);return(0,M.jsx)(a,{children:(0,M.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,M.jsxs)(i,{color:`permission`,children:[`Guest passes · `,S,` left`]}),(0,M.jsx)(l,{flexDirection:`row`,marginLeft:2,children:w.slice(0,3).map(e=>D(e))}),m&&(0,M.jsx)(l,{marginLeft:2,children:(0,M.jsx)(i,{children:m})}),(0,M.jsx)(l,{flexDirection:`column`,marginLeft:2,children:(0,M.jsxs)(i,{dimColor:!0,children:[g?`Share a free week of Claude Code with friends. If they love it and subscribe, you'll get ${O(g)} of extra usage to keep building. `:`Share a free week of Claude Code with friends. `,(0,M.jsx)(n,{url:g?`https://support.claude.com/en/articles/13456702-claude-code-guest-passes`:`https://support.claude.com/en/articles/12875061-claude-code-guest-passes`,children:`Terms apply.`})]})}),(0,M.jsx)(l,{children:(0,M.jsx)(i,{dimColor:!0,italic:!0,children:x.pending?(0,M.jsxs)(M.Fragment,{children:[`Press `,x.keyName,` again to exit`]}):(0,M.jsx)(M.Fragment,{children:`Enter to copy link · Esc to cancel`})})})]})})}var j,M,N=e((()=>{r(),j=t(r(),1),p(),w(),o(),S(),g(),k(),x(),v(),M=d()}));async function P(e){let t=!m().hasVisitedPasses;if(t){let e=D();f(t=>({...t,hasVisitedPasses:!0,passesLastSeenRemaining:e??t.passesLastSeenRemaining}))}return _(`tengu_guest_passes_visited`,{is_first_visit:t}),(0,F.jsx)(A,{onDone:e})}var F;e((()=>{r(),N(),g(),k(),h(),F=d()}))();export{P as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{_ as t,h as n}from"./debug-otxXY3j-.js";import{n as r,t as i}from"./cwd--iizewsn.js";import{i as a,o}from"./platform-mh9ypxS8.js";import{
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{_ as t,h as n}from"./debug-otxXY3j-.js";import{n as r,t as i}from"./cwd--iizewsn.js";import{i as a,o}from"./platform-mh9ypxS8.js";import{a as s,i as c}from"./windowsPaths-jbJ-skB_.js";import{l}from"./sessionStoragePortable-CJUZrbIq.js";import{homedir as u}from"os";import{dirname as d,isAbsolute as f,join as p,normalize as m,posix as h,relative as g,resolve as _}from"path";function v(e,t){let r=t??i()??n().cwd();if(typeof e!=`string`)throw TypeError(`Path must be a string, received ${typeof e}`);if(typeof r!=`string`)throw TypeError(`Base directory must be a string, received ${typeof r}`);if(e.includes(`\0`)||r.includes(`\0`))throw Error(`Path contains null bytes`);let o=e=>e.includes(`/`)&&!e.includes(`\\`)&&!/^[A-Za-z]:/.test(e),c=e.trim();if(!c)return a()===`windows`&&o(r)?h.normalize(r).normalize(`NFC`):m(r).normalize(`NFC`);if(c===`~`)return u().normalize(`NFC`);if(c.startsWith(`~/`))return p(u(),c.slice(2)).normalize(`NFC`);let l=c;if(a()===`windows`&&c.match(/^\/[a-z]\//i))try{l=s(c)}catch{l=c}return f(l)?a()===`windows`&&o(l)?h.normalize(l).normalize(`NFC`):m(l).normalize(`NFC`):a()===`windows`&&o(r)&&!/^[A-Za-z]:/.test(l)&&!l.startsWith(`\\\\`)?h.resolve(r,l).normalize(`NFC`):_(r,l).normalize(`NFC`)}function y(e){let t=g(i(),e);return t.startsWith(`..`)?e:t}function b(e){let t=v(e);if(t.startsWith(`\\\\`)||t.startsWith(`//`))return d(t);try{if(n().statSync(t).isDirectory())return t}catch{}return d(t)}function x(e){return/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(e)}function S(e){return m(e).replace(/\\/g,`/`)}var C=e((()=>{r(),t(),o(),c(),l()}));export{S as a,C as i,v as n,y as o,b as r,x as t};
|