@readmagic/workmate 0.0.21 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/AddWorkspaceDirectory-DWgTWJ7R.js +1 -0
- package/dist/chunks/AgentsMdExternalIncludesDialog-DCvgQ6n3.js +1 -0
- package/dist/chunks/AgentsMdExternalIncludesDialog-s0Orgord.js +1 -0
- package/dist/chunks/App-BcEI6U5j.js +1 -0
- package/dist/chunks/ApproveApiKey-DegdTXZl.js +1 -0
- package/dist/chunks/ApproveApiKey-_VXIMSwY.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-CjBt1L0p.js +2 -0
- package/dist/chunks/BypassPermissionsModeDialog-D2Gesf-u.js +1 -0
- package/dist/chunks/CustomSelect-B46Eh0gU.js +1 -0
- package/dist/chunks/DiffDialog-v2IiYyi3.js +6 -0
- package/dist/chunks/Doctor-BP0Rqraa.js +1 -0
- package/dist/chunks/Doctor-By_y3C2V.js +3 -0
- package/dist/chunks/ExitFlow-BasHk1mk.js +2 -0
- package/dist/chunks/Grove-C3mhgshv.js +11 -0
- package/dist/chunks/InvalidConfigDialog-DYVQK5js.js +1 -0
- package/dist/chunks/InvalidSettingsDialog-Dg6OiStR.js +1 -0
- package/dist/chunks/KeybindingProviderSetup-Bn1jzN5F.js +1 -0
- package/dist/chunks/MCPConnectionManager-ChN4Ayjk.js +1 -0
- package/dist/chunks/MCPToolListView-DLSrQHDc.js +1 -0
- package/dist/chunks/{McpParsingWarnings-6ENzOklf.js → McpParsingWarnings-DZejAh8b.js} +1 -1
- package/dist/chunks/MessageSelector-CdDlJE48.js +3 -0
- package/dist/chunks/Messages-DuL_r1Or.js +10 -0
- package/dist/chunks/Onboarding-CE2GNA-h.js +1 -0
- package/dist/chunks/{PromptInputFooterSuggestions-Blzgj5yW.js → PromptInputFooterSuggestions-lkr_A5jQ.js} +1 -1
- package/dist/chunks/PromptInputHelpMenu-DaQKKyM5.js +1 -0
- package/dist/chunks/QueryEngine-DNNy1UCD.js +1 -0
- package/dist/chunks/REPL-CEhW-C41.js +1 -0
- package/dist/chunks/REPL-CkSL4C_8.js +124 -0
- package/dist/chunks/ResumeConversation-BMCO_3X7.js +1 -0
- package/dist/chunks/SearchExtraToolsTool-DSy_jDhf.js +1 -0
- package/dist/chunks/SelectMulti-CNE06VAN.js +1 -0
- package/dist/chunks/Settings-mDykHLok.js +2 -0
- package/dist/chunks/Spinner-DwsJJUtn.js +1 -0
- package/dist/chunks/SpinnerGlyph-A6G-gloN.js +1 -0
- package/dist/chunks/TextInput-7uqPhq9T.js +22 -0
- package/dist/chunks/ThemePicker-DT9zVy-0.js +1 -0
- package/dist/chunks/TrustDialog-G4jM9IfM.js +1 -0
- package/dist/chunks/{ValidationErrorsList-2QWIs_6h.js → ValidationErrorsList-BLtP647v.js} +1 -1
- package/dist/chunks/add-dir-7RfQAC3h.js +1 -0
- package/dist/chunks/{agentDisplay-1Y-N-gqz.js → agentDisplay-vLQHFrmq.js} +1 -1
- package/dist/chunks/agents-BNg_skSm.js +101 -0
- package/dist/chunks/{agents-CvW8XjoJ.js → agents-DLz0kfsr.js} +1 -1
- package/dist/chunks/allErrors-DaztSMrw.js +1 -0
- package/dist/chunks/appleTerminalBackup-BYKdf3of.js +1 -0
- package/dist/chunks/auth-BTB00dq5.js +10 -0
- package/dist/chunks/auth-Bbc0Ny8i.js +1 -0
- package/dist/chunks/backgroundHousekeeping-DYz83_8C.js +1 -0
- package/dist/chunks/backgroundHousekeeping-bEZtlJSf.js +17 -0
- package/dist/chunks/banner-mqZEluky.js +2 -0
- package/dist/chunks/branch-exFKkymg.js +2 -0
- package/dist/chunks/{break-cache-BZ_UMtEL.js → break-cache-BL2gnDLX.js} +2 -2
- package/dist/chunks/btw-3l78DYET.js +1 -0
- package/dist/chunks/caches-6Nx6tsk9.js +1 -0
- package/dist/chunks/caches-ouaWB9bY.js +1 -0
- package/dist/chunks/claudeDesktop-D3PEgx3U.js +1 -0
- package/dist/chunks/{clear-D2KRoibg.js → clear-CXfhVRp8.js} +1 -1
- package/dist/chunks/client-C01Bnxxv.js +1 -0
- package/dist/chunks/client-DYRgRQsr.js +1 -0
- package/dist/chunks/{client-C_jBL1yC.js → client-DdenNfkQ.js} +1 -1
- package/dist/chunks/client-DvhWKIOx.js +1 -0
- package/dist/chunks/commands-BoxOw75F.js +1 -0
- package/dist/chunks/compact-BOYr105K.js +2 -0
- package/dist/chunks/config-BddEvZZl.js +3 -0
- package/dist/chunks/config-GEv9hUzz.js +1 -0
- package/dist/chunks/config-kw4xg7Nk.js +1 -0
- package/dist/chunks/{context-Db9tH1VF.js → context-3s9wtn4L.js} +1 -1
- package/dist/chunks/{context-noninteractive-CacA9VlT.js → context-noninteractive-CJhUu_4y.js} +9 -9
- package/dist/chunks/context-noninteractive-DFvoZ2L9.js +1 -0
- package/dist/chunks/conversation-CoGharlH.js +1 -0
- package/dist/chunks/conversation-MxEVm54C.js +1 -0
- package/dist/chunks/conversationRecovery-Da_8uldZ.js +1 -0
- package/dist/chunks/crossProjectResume-CzPCHq_K.js +40 -0
- package/dist/chunks/cwd-BcO6WHKo.js +1 -0
- package/dist/chunks/cwd-CDUelriw.js +1 -0
- package/dist/chunks/{datadog-BuElf2EQ.js → datadog-v_mXWncN.js} +1 -1
- package/dist/chunks/{debug-D58GQBDG.js → debug-8DCufdSp.js} +4 -4
- package/dist/chunks/detectRepository-DfX8xXw2.js +1 -0
- package/dist/chunks/{diff-yA6v_dpP.js → diff-DJSt7QO6.js} +1 -1
- package/dist/chunks/directoryCompletion-CT6YVeg7.js +1 -0
- package/dist/chunks/doctor-DWvioSU9.js +1 -0
- package/dist/chunks/entry-ex0-RyYV.js +13 -0
- package/dist/chunks/esm-BQY8jJNR.js +1 -0
- package/dist/chunks/{execFileNoThrow-B_KRY4cT.js → execFileNoThrow-BsfuytkN.js} +1 -1
- package/dist/chunks/exit-BxC_ZEtO.js +1 -0
- package/dist/chunks/extraUsage-DYm33Occ.js +1 -0
- package/dist/chunks/extractMemories-CzN3Ax2B.js +1 -0
- package/dist/chunks/fast-DqUpl_Lr.js +1 -0
- package/dist/chunks/fast-NUdUyAaM.js +1 -0
- package/dist/chunks/fetchModelList-CqsTAWEN.js +1 -0
- package/dist/chunks/fetchModelList-DBMHE6Ng.js +1 -0
- package/dist/chunks/fileSuggestions-B-SLfb-o.js +3 -0
- package/dist/chunks/firstPartyEventLogger-C0q45h_4.js +3 -0
- package/dist/chunks/firstPartyEventLogger-CP8hCBDj.js +1 -0
- package/dist/chunks/gemini-BC9kHhwe.js +2 -0
- package/dist/chunks/generateSessionName-ChvKBVxB.js +1 -0
- package/dist/chunks/{genericProcessUtils-Cnyun_Wr.js → genericProcessUtils-BYi0OefF.js} +1 -1
- package/dist/chunks/goal-ByyimpVU.js +3 -0
- package/dist/chunks/grok-DenjixMl.js +1 -0
- package/dist/chunks/grove-Dq8QbQ9o.js +7 -0
- package/dist/chunks/help-CK90i4hE.js +1 -0
- package/dist/chunks/history-CNQNd6hT.js +1 -0
- package/dist/chunks/{hooks-BDgToO1Z.js → hooks-BRFDg9DV.js} +2 -2
- package/dist/chunks/hooks-BaYwmkxD.js +1 -0
- package/dist/chunks/install-ZMll-dAa.js +1 -0
- package/dist/chunks/instrumentation-BwVyvRfY.js +21 -0
- package/dist/chunks/{job-DYMfSglZ.js → job-G_ukhLc4.js} +1 -1
- package/dist/chunks/keybindings-wNxBzDVQ.js +1 -0
- package/dist/chunks/launchLocalMemory-BcRlXLm6.js +3 -0
- package/dist/chunks/launchOnboarding-CDjQ64RO.js +8 -0
- package/dist/chunks/{loadAgentsDir-C96o6gCj.js → loadAgentsDir-C1LkW7gl.js} +551 -621
- package/dist/chunks/loadAgentsDir-DKXap_Om.js +1 -0
- package/dist/chunks/{loadPluginHooks-0nGlugZ4.js → loadPluginHooks-DtmHtEiS.js} +1 -1
- package/dist/chunks/{loader-C33o_5kS.js → loader-C61fB6vU.js} +1 -1
- package/dist/chunks/localSearch-BB9x5C2N.js +1 -0
- package/dist/chunks/{localSearch-DLz5IGGu.js → localSearch-DFo_WTMm.js} +1 -1
- package/dist/chunks/log-DaILwWJa.js +1 -0
- package/dist/chunks/logoUtils-Dj_2SWmO.js +1 -0
- package/dist/chunks/{magicDocs-DmPNMnNY.js → magicDocs-DYc9TFmI.js} +2 -2
- package/dist/chunks/main-BRg8L_aw.js +346 -0
- package/dist/chunks/managedEnv-DsqAYOJ4.js +1 -0
- package/dist/chunks/managedEnv-lybrMred.js +1 -0
- package/dist/chunks/mcp-Bsw3cMiJ.js +6 -0
- package/dist/chunks/mcp-DDdud6Y7.js +1 -0
- package/dist/chunks/mcp-DbgTDUt7.js +2 -0
- package/dist/chunks/memory-CzwTzihf.js +1 -0
- package/dist/chunks/mode-Pan-Q2c4.js +2 -0
- package/dist/chunks/model-BYfmXKHf.js +1 -0
- package/dist/chunks/model-BwBE0Pt5.js +1 -0
- package/dist/chunks/modelOptions-DvNBapgG.js +1 -0
- package/dist/chunks/nativeInstaller-DnSNJWIi.js +1 -0
- package/dist/chunks/notifications-B0DTaYoy.js +1 -0
- package/dist/chunks/omit-Dl1Us_PY.js +1 -0
- package/dist/chunks/onChangeAppState-4KOJMN82.js +1 -0
- package/dist/chunks/openai-C_6C1_0N.js +10 -0
- package/dist/chunks/overlayContext-CMV7nYR9.js +1 -0
- package/dist/chunks/{panel-Cm23FDVt.js → panel-D9fGQgln.js} +1 -1
- package/dist/chunks/parser-BKAVMTyD.js +1 -0
- package/dist/chunks/{parser-eVu-cTRs.js → parser-D8slvrJP.js} +1 -1
- package/dist/chunks/partition-B504IgAa.js +1 -0
- package/dist/chunks/pasteStore-DNV1M5Xd.js +1 -0
- package/dist/chunks/permissions-CLFMhdRk.js +3 -0
- package/dist/chunks/pidLock-D9do1Afy.js +3 -0
- package/dist/chunks/{plan-s228H7IU.js → plan-CQLnPLuE.js} +1 -1
- package/dist/chunks/{platform-DMQxcm4K.js → platform-Dzff1WWw.js} +1 -1
- package/dist/chunks/plugin-BYdF7uob.js +17 -0
- package/dist/chunks/{pluginAutoupdate-aLXhSUVD.js → pluginAutoupdate-BJaAqwTH.js} +1 -1
- package/dist/chunks/{pluginBlocklist-BprCv0En.js → pluginBlocklist-DKKmOnWM.js} +1 -1
- package/dist/chunks/pluginCliCommands-z8TtJMKH.js +1 -0
- package/dist/chunks/{pluginFlagging-BSLuTk3M.js → pluginFlagging-DQP8tBi2.js} +1 -1
- package/dist/chunks/pluginOperations-BcfJCDco.js +2 -0
- package/dist/chunks/{pluginStartupCheck-xQbHZ5gf.js → pluginStartupCheck-CfRvCrFg.js} +1 -1
- package/dist/chunks/pluginStartupCheck-Cq4PvULa.js +1 -0
- package/dist/chunks/plugins-CTM8jpOw.js +4 -0
- package/dist/chunks/policyLimits-a7ix6GnU.js +1 -0
- package/dist/chunks/poorMode-C11JEH3d.js +1 -0
- package/dist/chunks/{poorMode-Bt_A2arj.js → poorMode-J5SYJvoY.js} +1 -1
- package/dist/chunks/print-u6MzL5Cr.js +13 -0
- package/dist/chunks/processBashCommand-DIwrI2QC.js +1 -0
- package/dist/chunks/processSlashCommand-B-Gujpxm.js +5 -0
- package/dist/chunks/projectOnboardingState-CJycxw5P.js +1 -0
- package/dist/chunks/{prompt-BNNE5tsG.js → prompt-BGqgPgCU.js} +3 -3
- package/dist/chunks/prompt-BPJDGlx5.js +1 -0
- package/dist/chunks/prompt-DEdZzkEz.js +1 -0
- package/dist/chunks/promptEditor-CmQ9p4oe.js +4 -0
- package/dist/chunks/{protocolHandler-DukQ6b4Q.js → protocolHandler-CJo9-PfZ.js} +2 -2
- package/dist/chunks/{proxy-BhIc7-mj.js → proxy-CB17QimU.js} +2 -2
- package/dist/chunks/reconciler-DSKLuOS7.js +1 -0
- package/dist/chunks/refresh-BbZFCNpn.js +1 -0
- package/dist/chunks/registerProtocol-CLIpzVwF.js +1 -0
- package/dist/chunks/reload-plugins-DjugL8jH.js +1 -0
- package/dist/chunks/rename-DOtCOtEr.js +1 -0
- package/dist/chunks/{renderOptions-D-aQZbzS.js → renderOptions-Zqfm2U1y.js} +1 -1
- package/dist/chunks/resume-BB4T4WIV.js +2 -0
- package/dist/chunks/ripgrep-BuzOTf1S.js +5 -0
- package/dist/chunks/ripgrep-CZ2CqaHb.js +1 -0
- package/dist/chunks/{runtimeObserver-DS1PK6We.js → runtimeObserver-CK_iZ6OB.js} +1 -1
- package/dist/chunks/{runtimeObserver-CsZw5XBt.js → runtimeObserver-CpP0L9T9.js} +4 -4
- package/dist/chunks/sandbox-adapter-DhJJ6WOV.js +1 -0
- package/dist/chunks/sandbox-toggle-KOHYvbQT.js +1 -0
- package/dist/chunks/searchExtraTools-CdJghGkj.js +1 -0
- package/dist/chunks/select-C_KXmqbI.js +1 -0
- package/dist/chunks/sessionFileAccessHooks-D7KbWFp7.js +1 -0
- package/dist/chunks/sessionObserver-DB-sLv-X.js +1 -0
- package/dist/chunks/{sessionObserver-N7fORFdL.js → sessionObserver-WOYv2n7C.js} +2 -2
- package/dist/chunks/sessionStorage-sgOAbDn7.js +1 -0
- package/dist/chunks/{sessionTracing-fIp8g04N.js → sessionTracing-yBre24PH.js} +2 -2
- package/dist/chunks/settings-C-KNkvsM.js +1 -0
- package/dist/chunks/settings-DKN4xSpQ.js +24 -0
- package/dist/chunks/setup-CN_Pk7AR.js +3 -0
- package/dist/chunks/{shadowedRuleDetection-DEo1hvGi.js → shadowedRuleDetection-Df-kZ_pK.js} +1 -1
- package/dist/chunks/{sideQuestion-C11KgNGL.js → sideQuestion-CMB8hfgX.js} +3 -3
- package/dist/chunks/sinks-BS17vtN0.js +1 -0
- package/dist/chunks/sinks-D1EjkHb4.js +1 -0
- package/dist/chunks/skillChangeDetector-CBKuGuEi.js +1 -0
- package/dist/chunks/{skillGapStore-H4MkUFUY.js → skillGapStore-CfmlO6pb.js} +2 -2
- package/dist/chunks/{skillLifecycle-ADUTDK7D.js → skillLifecycle-BQ2LMfMx.js} +2 -2
- package/dist/chunks/{skillSearchPanel-PpfVDMGR.js → skillSearchPanel-BwYuwLFs.js} +4 -4
- package/dist/chunks/skills-BVHPQma0.js +1 -0
- package/dist/chunks/startupProfiler-B_U4QDtf.js +1 -0
- package/dist/chunks/startupProfiler-DTs9w9EN.js +3 -0
- package/dist/chunks/{state-D5D6QpTX.js → state-BowF111d.js} +1 -1
- package/dist/chunks/state-CGuyDES7.js +1 -0
- package/dist/chunks/status-BurdTfyz.js +2 -0
- package/dist/chunks/status-DMq1An5h.js +1 -0
- package/dist/chunks/statusNoticeHelpers-X75JNlx5.js +1 -0
- package/dist/chunks/stringUtils-BQm3OfeJ.js +4 -0
- package/dist/chunks/{switcher-DWfKi17X.js → switcher-Bq1Ct_Sn.js} +1 -1
- package/dist/chunks/switcher-DGD4ORVf.js +1 -0
- package/dist/chunks/{tasks-BwSsj2vI.js → tasks-0c8Uy04D.js} +1 -1
- package/dist/chunks/tempfile-CHO5wXsV.js +1 -0
- package/dist/chunks/{templateJobs-fiKuu4DK.js → templateJobs-BdFzE9XG.js} +1 -1
- package/dist/chunks/terminalSetup-Cf_r6pwK.js +32 -0
- package/dist/chunks/{terminalSetup-Cte5a4hM.js → terminalSetup-D7J6bxcn.js} +1 -1
- package/dist/chunks/{theme-CAoGjf2D.js → theme-Bby4fssR.js} +1 -1
- package/dist/chunks/tipRegistry-CyRXWWTz.js +2 -0
- package/dist/chunks/{toolEventObserver-Cq_ZV7x9.js → toolEventObserver-CzFZUIsM.js} +1 -1
- package/dist/chunks/toolPool-CnrZcprA.js +1 -0
- package/dist/chunks/types-zk5Ltv5q.js +81 -0
- package/dist/chunks/udsClient-ftP0yIpe.js +1 -0
- package/dist/chunks/use-select-navigation-DMaC_3iw.js +1 -0
- package/dist/chunks/useDoublePress-C9xxQzh1.js +1 -0
- package/dist/chunks/useExitOnCtrlCDWithKeybindings-CjW3gUOt.js +1 -0
- package/dist/chunks/useMainLoopModel-DWscpA9I.js +1 -0
- package/dist/chunks/useManagePlugins-CYXVcql2.js +1 -0
- package/dist/chunks/useMergedTools-DarmnCEw.js +1 -0
- package/dist/chunks/useSearchInput-C2JuUW3g.js +1 -0
- package/dist/chunks/useSettingsErrors-DutJBiKZ.js +1 -0
- package/dist/chunks/util-Bq5l7FF5.js +1 -0
- package/dist/chunks/validatePlugin-DIdEydz_.js +1 -0
- package/dist/chunks/{vim-xruiCyUd.js → vim-D8prM2IH.js} +1 -1
- package/dist/chunks/worktree-Caqt2WRZ.js +1 -0
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/AddWorkspaceDirectory-DgAxYgBY.js +0 -1
- package/dist/chunks/AgentsMdExternalIncludesDialog-DGMRVexR.js +0 -1
- package/dist/chunks/AgentsMdExternalIncludesDialog-Dp6CwZyI.js +0 -1
- package/dist/chunks/App-VWyPd524.js +0 -1
- package/dist/chunks/ApproveApiKey-Bolw0sPs.js +0 -1
- package/dist/chunks/ApproveApiKey-CyNPMd6g.js +0 -1
- package/dist/chunks/BackgroundTasksDialog-DxagIOOw.js +0 -2
- package/dist/chunks/BypassPermissionsModeDialog-OS2S66zQ.js +0 -1
- package/dist/chunks/DiffDialog-CMtml9iw.js +0 -6
- package/dist/chunks/Doctor-Bk9P37mU.js +0 -1
- package/dist/chunks/Doctor-D9F3tKsr.js +0 -3
- package/dist/chunks/ExitFlow-DhRv5JPj.js +0 -2
- package/dist/chunks/Grove-Bbh8PpH0.js +0 -11
- package/dist/chunks/HybridTransport-P1vEUwhv.js +0 -2
- package/dist/chunks/InvalidConfigDialog-xAYpE-20.js +0 -1
- package/dist/chunks/InvalidSettingsDialog-CXFSISy3.js +0 -1
- package/dist/chunks/MCPConnectionManager-CoId-C__.js +0 -1
- package/dist/chunks/MCPToolListView-BQkQ-hyF.js +0 -1
- package/dist/chunks/MessageSelector-BvRVrfg6.js +0 -3
- package/dist/chunks/Messages-Cykztq1O.js +0 -10
- package/dist/chunks/Onboarding-CfeRwPNQ.js +0 -1
- package/dist/chunks/PromptInputHelpMenu-Ckp0k8E3.js +0 -1
- package/dist/chunks/QueryEngine-DduzztIG.js +0 -1
- package/dist/chunks/REPL-B8e5UU3H.js +0 -128
- package/dist/chunks/REPL-C4mbOhyL.js +0 -1
- package/dist/chunks/RemoteSessionManager-BPESC6Wu.js +0 -2
- package/dist/chunks/ResumeConversation-DG1sLryB.js +0 -1
- package/dist/chunks/SSETransport-CDNP2PlK.js +0 -2
- package/dist/chunks/SearchExtraToolsTool-vK2PP628.js +0 -1
- package/dist/chunks/Settings-B7n_dfP-.js +0 -2
- package/dist/chunks/TeleportProgress-QL3ibQfK.js +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-f-xl7biD.js +0 -1
- package/dist/chunks/TeleportResumeWrapper-DzVcrFuP.js +0 -1
- package/dist/chunks/ThemePicker-CIFKZza0.js +0 -1
- package/dist/chunks/TrustDialog-C0HEwZPk.js +0 -1
- package/dist/chunks/add-dir-DmEhPnvj.js +0 -1
- package/dist/chunks/agents-D96ng5I9.js +0 -101
- package/dist/chunks/allErrors-CT2dbBF3.js +0 -1
- package/dist/chunks/api-DTyrmy1O.js +0 -1
- package/dist/chunks/api-DumFOErN.js +0 -1
- package/dist/chunks/auth-CZ4EsFWF.js +0 -10
- package/dist/chunks/auth-QvonHoG9.js +0 -1
- package/dist/chunks/auth-jV5THRH8.js +0 -1
- package/dist/chunks/backgroundHousekeeping-C72oPgfD.js +0 -17
- package/dist/chunks/backgroundHousekeeping-D9PScHES.js +0 -1
- package/dist/chunks/banner-ChT5Ri7Q.js +0 -2
- package/dist/chunks/bg-qG2osBbP.js +0 -9
- package/dist/chunks/branch-K8X6jx0i.js +0 -2
- package/dist/chunks/bridgeConfig-C-bI-slm.js +0 -1
- package/dist/chunks/bridgeConfig-_xpxhGB5.js +0 -1
- package/dist/chunks/bridgeMessaging-DSJlYarJ.js +0 -1
- package/dist/chunks/bridgePointer-DfTOjgtX.js +0 -1
- package/dist/chunks/bridgeStatusUtil-DaEq5c69.js +0 -1
- package/dist/chunks/btw-BNs5OX7x.js +0 -1
- package/dist/chunks/bundledMode--fG1S62b.js +0 -1
- package/dist/chunks/caches-CC5NHwAz.js +0 -1
- package/dist/chunks/caches-nHxJWXgO.js +0 -1
- package/dist/chunks/capacityWake-BpP6c7x3.js +0 -3
- package/dist/chunks/ccrClient-JnhF5b3z.js +0 -1
- package/dist/chunks/claudeDesktop-DPc_SaVn.js +0 -1
- package/dist/chunks/cliLaunch-DDtwAolw.js +0 -1
- package/dist/chunks/client-9uHzAmFH.js +0 -1
- package/dist/chunks/client-BVal_QII.js +0 -1
- package/dist/chunks/client-BtTkq0YS.js +0 -1
- package/dist/chunks/client-Dd7CKMRX.js +0 -1
- package/dist/chunks/commands-C_rYjyQZ.js +0 -1
- package/dist/chunks/compact-Cqd6vKpn.js +0 -2
- package/dist/chunks/config-Be0BkAAr.js +0 -1
- package/dist/chunks/config-DUTgj3js.js +0 -3
- package/dist/chunks/config-DoEDgAfv.js +0 -1
- package/dist/chunks/context-noninteractive-D9tJYwi7.js +0 -1
- package/dist/chunks/controlMessageCompat-IFu4Gc1y.js +0 -1
- package/dist/chunks/conversation-DWfE4KGH.js +0 -1
- package/dist/chunks/conversation-Tvo4EDpQ.js +0 -1
- package/dist/chunks/createSSHSession-BQ83MMtr.js +0 -5
- package/dist/chunks/createSession-CqHnHhCR.js +0 -1
- package/dist/chunks/createSession-DqTtBycR.js +0 -1
- package/dist/chunks/crossProjectResume-DIXtiODF.js +0 -40
- package/dist/chunks/cwd-DLK3znO7.js +0 -1
- package/dist/chunks/cwd-Nh5IZNKO.js +0 -1
- package/dist/chunks/debugUtils-DXBRbwCE.js +0 -1
- package/dist/chunks/detached-Biz-xhu0.js +0 -4
- package/dist/chunks/detectRepository-DUJBh5s2.js +0 -1
- package/dist/chunks/detectRepository-pRAVv8SH.js +0 -1
- package/dist/chunks/directoryCompletion-CuA3_YIT.js +0 -1
- package/dist/chunks/doctor-eNAm6OiS.js +0 -1
- package/dist/chunks/entry-DidpiR-D.js +0 -13
- package/dist/chunks/esm-BCUC71kt.js +0 -1
- package/dist/chunks/execSyncWrapper-C3ZFV9od.js +0 -1
- package/dist/chunks/exit-DywUeiYd.js +0 -1
- package/dist/chunks/extraUsage-DiAirtuk.js +0 -1
- package/dist/chunks/extractMemories-_xiTnX95.js +0 -1
- package/dist/chunks/fast-DCXZACT9.js +0 -1
- package/dist/chunks/fast-Qo4WVqiW.js +0 -1
- package/dist/chunks/fetchModelList-fQDsmR3E.js +0 -1
- package/dist/chunks/fetchModelList-woVzIVde.js +0 -1
- package/dist/chunks/fileSuggestions-CRx1D6uk.js +0 -3
- package/dist/chunks/firstPartyEventLogger-B261Wksn.js +0 -3
- package/dist/chunks/firstPartyEventLogger-DtFTeHy-.js +0 -1
- package/dist/chunks/flushGate-BA8dSr0i.js +0 -1
- package/dist/chunks/gemini-BXAyy1JN.js +0 -1
- package/dist/chunks/generateSessionName-Cwmk2N3F.js +0 -1
- package/dist/chunks/git-Wid-XppW.js +0 -5
- package/dist/chunks/git-hO-TMvXc.js +0 -1
- package/dist/chunks/githubRepoPathMapping-OV8U1VFK.js +0 -1
- package/dist/chunks/goal-C9clrwEH.js +0 -3
- package/dist/chunks/grok-CjeCecsZ.js +0 -1
- package/dist/chunks/grove-DqTnK9nn.js +0 -7
- package/dist/chunks/hash-Tu-My5Vp.js +0 -1
- package/dist/chunks/help-Bb6LdzXK.js +0 -1
- package/dist/chunks/hooks-BX2s7aoL.js +0 -1
- package/dist/chunks/initReplBridge-D7cuY_os.js +0 -1
- package/dist/chunks/install-eCA8UACi.js +0 -1
- package/dist/chunks/instrumentation-BaRKojJh.js +0 -21
- package/dist/chunks/jwtUtils-JE2okZ70.js +0 -1
- package/dist/chunks/keybindings-iBqc1KHL.js +0 -1
- package/dist/chunks/launchLocalMemory-IZPGEzMk.js +0 -3
- package/dist/chunks/launchOnboarding-BeNf51Ig.js +0 -8
- package/dist/chunks/lazySchema-DULtBUCI.js +0 -65
- package/dist/chunks/lib-BlVGipXx.js +0 -14
- package/dist/chunks/loadAgentsDir-Bpke9CtB.js +0 -1
- package/dist/chunks/localSearch-dodgnjGn.js +0 -1
- package/dist/chunks/log-CZ7ploQm.js +0 -1
- package/dist/chunks/logoUtils-Cg_6QV1Z.js +0 -1
- package/dist/chunks/main-7ssnA9Yb.js +0 -31
- package/dist/chunks/main-BEv6MqMX.js +0 -356
- package/dist/chunks/managedEnv-CHYvwXBH.js +0 -1
- package/dist/chunks/managedEnv-CbjOQmEe.js +0 -1
- package/dist/chunks/mappers-D8VLUZ2N.js +0 -1
- package/dist/chunks/mcp-BUn3yqsT.js +0 -1
- package/dist/chunks/mcp-BskLq9iP.js +0 -2
- package/dist/chunks/mcp-C-0DMaXx.js +0 -6
- package/dist/chunks/memoize-CumjjK2Q.js +0 -1
- package/dist/chunks/memory-vDkJM58W.js +0 -1
- package/dist/chunks/mode-Dbh21H2Y.js +0 -2
- package/dist/chunks/model-BaMclMXn.js +0 -1
- package/dist/chunks/model-atn3_JBi.js +0 -1
- package/dist/chunks/model-vS1Iewyq.js +0 -1
- package/dist/chunks/modelOptions-Cw1ThINb.js +0 -1
- package/dist/chunks/nativeInstaller-CfZ5uNTh.js +0 -1
- package/dist/chunks/oauth-D38aRTUb.js +0 -1
- package/dist/chunks/oauth-U649LV5H.js +0 -1
- package/dist/chunks/omit-B7eQ9q0x.js +0 -1
- package/dist/chunks/onChangeAppState-kEAt8nxV.js +0 -1
- package/dist/chunks/openai-wh8AX5iz.js +0 -10
- package/dist/chunks/parser-Cq9X7HMP.js +0 -1
- package/dist/chunks/partition-CENvOfiS.js +0 -1
- package/dist/chunks/permissions-ChuIx-d4.js +0 -3
- package/dist/chunks/pidLock-C1hmh3YQ.js +0 -3
- package/dist/chunks/plugin-DVBEWwMP.js +0 -17
- package/dist/chunks/pluginCliCommands-WzzqR1Sr.js +0 -1
- package/dist/chunks/pluginOperations-Ca9Lup5G.js +0 -2
- package/dist/chunks/pluginStartupCheck-DdtxcNwH.js +0 -1
- package/dist/chunks/plugins-DdIaXpNb.js +0 -4
- package/dist/chunks/pollConfig-2nFzv6Hy.js +0 -1
- package/dist/chunks/poorMode-ZIq2oz7q.js +0 -1
- package/dist/chunks/print-vxrRE1O2.js +0 -14
- package/dist/chunks/processBashCommand-ISucgwpi.js +0 -1
- package/dist/chunks/processSlashCommand-BnpXO_fI.js +0 -5
- package/dist/chunks/prompt-2AA5W7EH.js +0 -1
- package/dist/chunks/prompt-AXiS2LoO.js +0 -1
- package/dist/chunks/promptEditor-DT6egmcb.js +0 -4
- package/dist/chunks/rcDebugLog-DSchf3Hs.js +0 -1
- package/dist/chunks/reconciler-D3zyJCnV.js +0 -1
- package/dist/chunks/refresh-BSG0t4cf.js +0 -1
- package/dist/chunks/registerProtocol-BOEYaX-X.js +0 -1
- package/dist/chunks/reload-plugins-BFMRhbv8.js +0 -1
- package/dist/chunks/remoteBridgeCore-D5OwvmAz.js +0 -1
- package/dist/chunks/remoteManagedSettings-DyGVvvcW.js +0 -1
- package/dist/chunks/rename-BrEwj3Xw.js +0 -1
- package/dist/chunks/resume-DR5JbICs.js +0 -2
- package/dist/chunks/ripgrep-Dt4a91S5.js +0 -5
- package/dist/chunks/ripgrep-KTOU5s9J.js +0 -1
- package/dist/chunks/sandbox-adapter-BqDyWcol.js +0 -1
- package/dist/chunks/sandbox-toggle-B9f_0NQI.js +0 -1
- package/dist/chunks/searchExtraTools-2pIT2C8u.js +0 -1
- package/dist/chunks/session-wkRTfdo8.js +0 -2
- package/dist/chunks/sessionFileAccessHooks-DV22q9JO.js +0 -1
- package/dist/chunks/sessionIdCompat-Dgp6PW_1.js +0 -1
- package/dist/chunks/sessionObserver-BLJg0qm_.js +0 -1
- package/dist/chunks/sessionState-8jutEorw.js +0 -11
- package/dist/chunks/sessionStorage-DRV7IhZF.js +0 -1
- package/dist/chunks/sessionStoragePortable-x0Yn02-G.js +0 -3
- package/dist/chunks/settings-BowI3jp-.js +0 -19
- package/dist/chunks/settings-CHn0gJCG.js +0 -1
- package/dist/chunks/settingsSync-DF4JgSNc.js +0 -1
- package/dist/chunks/setup-UiEO9i7F.js +0 -3
- package/dist/chunks/shellQuote-Ddgr1vif.js +0 -4
- package/dist/chunks/sinks-DnLqRPEC.js +0 -1
- package/dist/chunks/sinks-mGBiINp8.js +0 -1
- package/dist/chunks/skillChangeDetector-Dc6YZXJE.js +0 -1
- package/dist/chunks/skills-DKtN17ch.js +0 -1
- package/dist/chunks/startupProfiler-B90b5vuq.js +0 -3
- package/dist/chunks/startupProfiler-DG2TN5R_.js +0 -1
- package/dist/chunks/state-BStOuCh4.js +0 -1
- package/dist/chunks/stats-D4LEtkrw.js +0 -1
- package/dist/chunks/status-0ZBx6Ls0.js +0 -2
- package/dist/chunks/status-BUJ4-omB.js +0 -1
- package/dist/chunks/statusNoticeHelpers-BrpQWj0l.js +0 -1
- package/dist/chunks/stringUtils-D7oJIyY2.js +0 -4
- package/dist/chunks/subprocessEnv-CNBOhlDV.js +0 -1
- package/dist/chunks/subprocessEnv-DtBCqQIo.js +0 -1
- package/dist/chunks/switcher-D7Ey5uIi.js +0 -1
- package/dist/chunks/syncCache-DUhciJLz.js +0 -1
- package/dist/chunks/teleport-DwZMevmQ.js +0 -1
- package/dist/chunks/terminalSetup-a7-BNS4T.js +0 -32
- package/dist/chunks/tmux-DA06aewY.js +0 -1
- package/dist/chunks/toolPool-mdsxlKWR.js +0 -1
- package/dist/chunks/trustedDevice-C1m--Yjw.js +0 -1
- package/dist/chunks/trustedDevice-CeDIk_ln.js +0 -1
- package/dist/chunks/types-APu4OCXJ.js +0 -17
- package/dist/chunks/udsClient-BcwsY0XE.js +0 -1
- package/dist/chunks/upstreamproxy-CTOuotLO.js +0 -10
- package/dist/chunks/useExitOnCtrlCDWithKeybindings-L5idX6Kz.js +0 -1
- package/dist/chunks/useMainLoopModel-VXeS2EC6.js +0 -1
- package/dist/chunks/useManagePlugins-CAXp5CfH.js +0 -1
- package/dist/chunks/useMergedTools-DYXrPTIA.js +0 -1
- package/dist/chunks/useSearchInput-Bxl4wGcZ.js +0 -1
- package/dist/chunks/useSettingsErrors-sbjsaT7k.js +0 -1
- package/dist/chunks/userAgent-NbKd-hN7.js +0 -1
- package/dist/chunks/util-DU63xTwZ.js +0 -1
- package/dist/chunks/validatePlugin-DQ_9OCpP.js +0 -1
- package/dist/chunks/which-B8rchd8P.js +0 -1
- package/dist/chunks/windowsPaths-BdhjMYTm.js +0 -1
- package/dist/chunks/windowsPaths-DtGZ83kH.js +0 -1
- package/dist/chunks/workSecret-CaM2yIJD.js +0 -1
- package/dist/chunks/workerRegistry-BBgquE8F.js +0 -2
- package/dist/chunks/worktree-C28I8mFB.js +0 -1
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{l as n,o as r}from"./envUtils-DcaKZlRU.js";import{n as i,t as a}from"./figures-5ThXQEtq.js";import{$f as o,Ax as s,BS as c,Bw as l,Cm as u,Eh as d,FS as f,GS as p,Gf as m,IS as h,LS as g,NS as _,PS as v,Qf as y,Sm as b,Ta as x,Th as S,Tw as C,VS as w,Vw as T,Wf as ee,_f as E,aa as D,af as te,ag as ne,ba as re,bf as ie,ca as ae,da as oe,ea as se,ga as O,gf as k,gu as A,hu as j,hy as ce,ia as le,jS as ue,jx as de,kx as M,lT as N,la as fe,ma as pe,mu as P,mw as me,nT as he,oT as ge,oa as _e,of as ve,pf as ye,sa as be,sf as xe,tT as Se,va as Ce,vf as we,vh as Te,vw as Ee,vy as De,xf as F,xy as Oe,yf as ke,yh as Ae,yw as je,yy as Me,zw as I}from"./loadAgentsDir-C96o6gCj.js";import{C as Ne,Gr as L,I as R,N as Pe,P as z,Pn as Fe,Rn as Ie,ai as B,di as Le,fi as Re,j as ze,mt as Be,ot as Ve,t as V,xt as He}from"./src-DL3w8VPk.js";import{t as H}from"./jsx-runtime-Bb4Xn-E0.js";import{Ut as Ue,z as We}from"./state-D5D6QpTX.js";import{n as Ge,t as Ke}from"./cwd-Nh5IZNKO.js";import{a as qe,c as Je,i as Ye,n as Xe,o as Ze}from"./debug-D58GQBDG.js";import{Ut as Qe,Vt as $e,h as et,t as tt}from"./settings-BowI3jp-.js";import{c as nt,h as rt,y as it}from"./config-DUTgj3js.js";import{B as at,L as ot,R as st,q as ct}from"./log-CZ7ploQm.js";import{b as lt,f as ut,m as dt,v as ft}from"./startupProfiler-B90b5vuq.js";import{l as pt,o as mt}from"./stringUtils-D7oJIyY2.js";import{E as ht,Pt as gt,_ as _t,b as vt,dn as yt,fn as bt,gt as xt,xt as St,yt as Ct,zt as wt}from"./model-BaMclMXn.js";import{gn as Tt,vn as Et}from"./prompt-BNNE5tsG.js";import{d as Dt,f as Ot,h as kt,p as At}from"./terminalSetup-a7-BNS4T.js";import{at as jt,st as Mt}from"./sessionState-8jutEorw.js";import{n as Nt,t as Pt}from"./systemTheme-Ceakddth.js";import{n as Ft,r as It}from"./PromptInputFooterSuggestions-Blzgj5yW.js";import{n as Lt,t as Rt}from"./useMainLoopModel-VXeS2EC6.js";import{n as zt,t as Bt}from"./modalContext-DDZdU1J8.js";import{n as Vt,r as Ht,t as Ut}from"./statusNoticeHelpers-BrpQWj0l.js";import{a as Wt,c as Gt,i as Kt,l as qt,n as Jt,o as Yt,r as Xt,t as Zt,u as Qt}from"./logoUtils-Cg_6QV1Z.js";import{homedir as $t}from"os";import{relative as en}from"path";import{fileURLToPath as tn}from"url";function nn(e,t){for(let n of e)if(!t.has(n))return!1;return!0}var rn=e((()=>{}));function an(e){if(e.type!==`user`)return!1;let t=Array.isArray(e.message.content)?e.message.content[0]:void 0;return!t||typeof t==`string`||t?.type!==`text`||!t.text.includes(`<task-notification`)||me(t.text,`status`)!==`completed`?!1:me(t.text,`summary`)?.startsWith(`Background command `)??!1}function on(e,t){if(!Ae()||t)return e;let n=[],r=0;for(;r<e.length;){let t=e[r];if(an(t)){let i=0;for(;r<e.length&&an(e[r]);)i++,r++;i===1?n.push(t):n.push({...t,message:{role:`user`,content:[{type:`text`,text:`<${at}><${ot}>completed</${ot}><${st}>${i} background commands completed</${st}></${at}>`}]}})}else n.push(t),r++}return n}var sn=e((()=>{ct(),ne(),Te(),se()}));function cn(e){return e.type===`system`&&e.subtype===`stop_hook_summary`&&e.hookLabel!==void 0}function ln(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(cn(r)){let i=r.hookLabel,a=[];for(;n<e.length;){let t=e[n];if(!cn(t)||t.hookLabel!==i)break;a.push(t),n++}a.length===1?t.push(r):t.push({...r,hookCount:a.reduce((e,t)=>e+t.hookCount,0),hookInfos:a.flatMap(e=>e.hookInfos),hookErrors:a.flatMap(e=>e.hookErrors),preventedContinuation:a.some(e=>e.preventedContinuation),hasOutput:a.some(e=>e.hasOutput),totalDurationMs:Math.max(...a.map(e=>e.totalDurationMs??0))})}else t.push(r),n++}return t}var un=e((()=>{}));function dn(e){let t=mn.get(e);return t||(t=new Set(e.filter(e=>e.renderGroupedToolUse).map(e=>e.name)),mn.set(e,t)),t}function fn(e){if(e.type===`assistant`&&e.message?.content&&Array.isArray(e.message.content)&&e.message.content[0]?.type===`tool_use`){let t=e.message.content[0];return{messageId:e.message.id,toolUseId:t.id,toolName:t.name}}return null}function pn(e,t,n=!1){if(n)return{messages:e};let r=dn(t),i=new Map;for(let t of e){let e=fn(t);if(e&&r.has(e.toolName)){let n=`${e.messageId}:${e.toolName}`,r=i.get(n)??[];r.push(t),i.set(n,r)}}let a=new Map,o=new Set;for(let[e,t]of i)if(t.length>=2){a.set(e,t);for(let e of t){let t=fn(e);t&&o.add(t.toolUseId)}}let s=new Map;for(let t of e)if(t.type===`user`&&t.message?.content&&Array.isArray(t.message.content))for(let e of t.message.content)e.type===`tool_result`&&o.has(e.tool_use_id)&&s.set(e.tool_use_id,t);let c=[],l=new Set;for(let t of e){let e=fn(t);if(e){let t=`${e.messageId}:${e.toolName}`,n=a.get(t);if(n){if(!l.has(t)){l.add(t);let r=n[0],i=[];for(let e of n){let t=e.message.content[0].id,n=s.get(t);n&&i.push(n)}let a={type:`grouped_tool_use`,toolName:e.toolName,messages:n,results:i,displayMessage:r,uuid:`grouped-${r.uuid}`,timestamp:r.timestamp,messageId:e.messageId};c.push(a)}continue}}if(t.type===`user`&&t.message?.content&&Array.isArray(t.message.content)){let e=t.message.content.filter(e=>e.type===`tool_result`);if(e.length>0&&e.every(e=>o.has(e.tool_use_id)))continue}c.push(t)}return{messages:c}}var mn,hn=e((()=>{mn=new WeakMap}));function gn(e){let t=Sn.get(e);if(t!==void 0)return t;let n=_n(e).toLowerCase();return Sn.set(e,n),n}function _n(e){let t=``;switch(e.type){case`user`:{let n=e.message.content;if(typeof n==`string`)t=xn.has(n)?``:n;else{let r=[];for(let t of n??[])t.type===`text`?xn.has(t.text)||r.push(t.text):t.type===`tool_result`&&r.push(yn(e.toolUseResult));t=r.join(`
|
|
2
|
-
`)}break}case`assistant`:{let n=e.message.content;Array.isArray(n)&&(t=n.flatMap(e=>e.type===`text`?[e.text]:e.type===`tool_use`?[vn(e.input)]:[]).join(`
|
|
3
|
-
`));break}case`attachment`:if(e.attachment.type===`relevant_memories`)t=(e.attachment.memories??[]).map(e=>e.content).join(`
|
|
4
|
-
`);else if(e.attachment.type===`queued_command`&&e.attachment.commandMode!==`task-notification`&&!e.attachment.isMeta){let n=e.attachment.prompt;t=typeof n==`string`?n:n.flatMap(e=>e.type===`text`?[e.text]:[]).join(`
|
|
5
|
-
`)}break;case`collapsed_read_search`:e.relevantMemories&&(t=e.relevantMemories.map(e=>e.content).join(`
|
|
6
|
-
`));break;default:break}let n=t,r=n.indexOf(`<system-reminder>`);for(;r>=0;){let e=n.indexOf(bn,r);if(e<0)break;n=n.slice(0,r)+n.slice(e+18),r=n.indexOf(`<system-reminder>`)}return n}function vn(e){if(!e||typeof e!=`object`)return``;let t=e,n=[];for(let e of[`command`,`pattern`,`file_path`,`path`,`prompt`,`description`,`query`,`url`,`skill`]){let r=t[e];typeof r==`string`&&n.push(r)}for(let e of[`args`,`files`]){let r=t[e];Array.isArray(r)&&r.every(e=>typeof e==`string`)&&n.push(r.join(` `))}return n.join(`
|
|
7
|
-
`)}function yn(e){if(!e||typeof e!=`object`)return typeof e==`string`?e:``;let t=e;if(typeof t.stdout==`string`){let e=typeof t.stderr==`string`?t.stderr:``;return t.stdout+(e?`\n${e}`:``)}if(t.file&&typeof t.file==`object`&&typeof t.file.content==`string`)return t.file.content;let n=[];for(let e of[`content`,`output`,`result`,`text`,`message`]){let r=t[e];typeof r==`string`&&n.push(r)}for(let e of[`filenames`,`lines`,`results`]){let r=t[e];Array.isArray(r)&&r.every(e=>typeof e==`string`)&&n.push(r.join(`
|
|
8
|
-
`))}return n.join(`
|
|
9
|
-
`)}var bn,xn,Sn,Cn=e((()=>{se(),bn=`</system-reminder>`,xn=new Set([l,T]),Sn=new WeakMap}));function wn({pose:e=`default`}={}){return(0,Tn.jsxs)(R,{flexDirection:`column`,alignItems:`center`,children:[(0,Tn.jsx)(z,{color:`clawd_body`,children:` █████ `}),(0,Tn.jsx)(z,{color:`clawd_body`,children:`██ ● ● ██`}),(0,Tn.jsx)(z,{color:`clawd_body`,children:`██ ▄▄▄ ██`}),(0,Tn.jsx)(z,{color:`clawd_body`,children:` █ █ █ █ `})]})}var Tn,En=e((()=>{V(),Tn=H()}));function Dn(e){let{title:t,lines:n,footer:r,emptyMessage:i,customContent:a}=e,o=L(t);if(a!==void 0)o=Math.max(o,a.width);else if(n.length===0&&i)o=Math.max(o,L(i));else{let e=Math.max(0,...n.map(e=>e.timestamp?L(e.timestamp):0));for(let t of n){let n=e>0?e:0,r=L(t.text)+(n>0?n+2:0);o=Math.max(o,r)}}return r&&(o=Math.max(o,L(r))),o}function On({config:e,actualWidth:t}){let{title:n,lines:r,footer:i,emptyMessage:a,customContent:o}=e,s=Math.max(0,...r.map(e=>e.timestamp?L(e.timestamp):0));return(0,U.jsxs)(R,{flexDirection:`column`,width:t,children:[(0,U.jsx)(z,{bold:!0,color:`claude`,children:n}),o?(0,U.jsxs)(U.Fragment,{children:[o.content,i&&(0,U.jsx)(z,{dimColor:!0,italic:!0,children:lt(i,t)})]}):r.length===0&&a?(0,U.jsx)(z,{dimColor:!0,children:lt(a,t)}):(0,U.jsxs)(U.Fragment,{children:[r.map((e,n)=>{let r=Math.max(10,t-(s>0?s+2:0));return(0,U.jsxs)(z,{children:[s>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(z,{dimColor:!0,children:(e.timestamp||``).padEnd(s)}),` `]}),(0,U.jsx)(z,{children:lt(e.text,r)})]},n)}),i&&(0,U.jsx)(z,{dimColor:!0,italic:!0,children:lt(i,t)})]})]})}var U,kn=e((()=>{V(),ft(),U=H()}));function An({feeds:e,maxWidth:t}){let n=e.map(e=>Dn(e)),r=Math.max(...n),i=Math.min(r,t);return(0,Mn.jsx)(R,{flexDirection:`column`,children:e.map((t,n)=>(0,Mn.jsxs)(jn.Fragment,{children:[(0,Mn.jsx)(On,{config:t,actualWidth:i}),n<e.length-1&&(0,Mn.jsx)(Ne,{color:`claude`,width:i})]},n))})}var jn,Mn,Nn=e((()=>{jn=t(B(),1),V(),kn(),Mn=H()}));function Pn(e){let t=e.map(e=>{let t=dt(e.modified);return{text:(e.summary&&e.summary!==`No prompt`?e.summary:e.firstPrompt)||``,timestamp:t}});return{title:`Recent activity`,lines:t,footer:t.length>0?`/resume for more`:void 0,emptyMessage:`No recent activity`}}function Fn(e){let t=e.filter(({isEnabled:e})=>e).sort((e,t)=>Number(e.isComplete)-Number(t.isComplete)).map(({text:e,isComplete:t})=>({text:`${t?`${a.tick} `:``}${e}`})),n=Ke()===$t()?`Note: You have launched claude in your home directory. For the best experience, launch it in a project directory instead.`:void 0;return n&&t.push({text:n}),{title:`Tips for getting started`,lines:t}}var In=e((()=>{i(),Ge(),ft()}));function Ln(e,t,n){return Array.from({length:n},()=>({pose:e,offset:t}))}function Rn(){let{pose:e,bounceOffset:t,onClick:n}=zn();return(0,Vn.jsx)(R,{height:qn,flexDirection:`column`,onClick:n,children:(0,Vn.jsx)(R,{marginTop:t,flexShrink:0,children:(0,Vn.jsx)(wn,{pose:e})})})}function zn(){let[e]=(0,Bn.useState)(()=>tt().prefersReducedMotion??!1),[t,n]=(0,Bn.useState)(-1),r=(0,Bn.useRef)(Hn),i=()=>{e||t!==-1||(r.current=Un[Math.floor(Math.random()*Un.length)],n(0))};(0,Bn.useEffect)(()=>{if(t===-1)return;if(t>=r.current.length){n(-1);return}let e=setTimeout(n,Gn,Kn);return()=>clearTimeout(e)},[t]);let a=r.current,o=t>=0&&t<a.length?a[t]:Wn;return{pose:o.pose,bounceOffset:o.offset,onClick:i}}var Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn=e((()=>{Bn=t(B(),1),V(),et(),En(),Vn=H(),Hn=[...Ln(`default`,1,2),...Ln(`arms-up`,0,3),...Ln(`default`,0,1),...Ln(`default`,1,2),...Ln(`arms-up`,0,3),...Ln(`default`,0,1)],Un=[Hn,[...Ln(`look-right`,0,5),...Ln(`look-left`,0,5),...Ln(`default`,0,1)]],Wn={pose:`default`,offset:0},Gn=60,Kn=e=>e+1,qn=3}));function Yn(){let{columns:e}=Ve(),t=d(e=>e.agent),n=ht(Lt()),{version:r,cwd:i,billingType:a,agentName:o}=Yt(),s=t??o,c=Math.max(e-15,20),l=lt(r,Math.max(c-11,6)),{shouldSplit:u,truncatedModel:f,truncatedBilling:p}=Xt(n,a,c),m=s?c-1-L(s)-3:c,h=Qt(i,Math.max(m,10));return(0,W.jsx)(b,{children:(0,W.jsxs)(R,{flexDirection:`row`,gap:2,alignItems:`center`,children:[Ae()?(0,W.jsx)(Rn,{}):(0,W.jsx)(wn,{}),(0,W.jsxs)(R,{flexDirection:`column`,children:[(0,W.jsxs)(z,{children:[(0,W.jsx)(z,{bold:!0,children:`Work Mate`}),` `,(0,W.jsxs)(z,{dimColor:!0,children:[`v`,l]})]}),u?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(z,{dimColor:!0,children:f}),(0,W.jsx)(z,{dimColor:!0,children:p})]}):(0,W.jsxs)(z,{dimColor:!0,children:[f,` · `,p]}),(0,W.jsx)(z,{dimColor:!0,children:s?`@${s} · ${h}`:h})]})]})})}var W,Xn=e((()=>{Rt(),p(),V(),S(),ft(),Te(),qt(),_t(),u(),Jn(),En(),W=H()}));function Zn(){let e=(0,$n.useMemo)(Qn,[]),t=(0,$n.useMemo)(()=>nt().lastShownEmergencyTip,[]),n=e.tip&&e.tip!==t;return(0,$n.useEffect)(()=>{n&&it(t=>t.lastShownEmergencyTip===e.tip?t:{...t,lastShownEmergencyTip:e.tip})},[n,e.tip]),n?(0,er.jsx)(R,{paddingLeft:2,flexDirection:`column`,children:(0,er.jsx)(z,{...e.color===`warning`?{color:`warning`}:e.color===`error`?{color:`error`}:{dimColor:!0},children:e.tip})}):null}function Qn(){return tr}var $n,er,tr,nr=e((()=>{$n=t(B(),1),V(),rt(),er=H(),tr={tip:``,color:`dim`}}));function rr({char:e=`✻`}){let[t]=(0,ir.useState)(()=>tt().prefersReducedMotion??!1),[n,r]=(0,ir.useState)(t),i=(0,ir.useRef)(null),[a,o]=Be(n?null:50);return(0,ir.useEffect)(()=>{if(n)return;let e=setTimeout(r,sr,!0);return()=>clearTimeout(e)},[n]),n?(0,ar.jsx)(R,{ref:a,children:(0,ar.jsx)(z,{color:cr,children:e})}):(i.current===null&&(i.current=o),(0,ar.jsx)(R,{ref:a,children:(0,ar.jsx)(z,{color:A(P((o-i.current)/or*360%360)),children:e})}))}var ir,ar,or,sr,cr,lr=e((()=>{ir=t(B(),1),Qe(),V(),et(),j(),ar=H(),or=1500,sr=or*2,cr=A({r:153,g:153,b:153})}));function ur(){return vt()&&(nt().opus1mMergeNoticeSeenCount??0)<mr}function dr(){let[e]=(0,fr.useState)(ur);return(0,fr.useEffect)(()=>{if(!e)return;let t=(nt().opus1mMergeNoticeSeenCount??0)+1;it(e=>(e.opus1mMergeNoticeSeenCount??0)>=t?e:{...e,opus1mMergeNoticeSeenCount:t})},[e]),e?(0,pr.jsxs)(R,{paddingLeft:2,children:[(0,pr.jsx)(rr,{char:`↑`}),(0,pr.jsx)(z,{dimColor:!0,children:` Opus now defaults to 1M context · 5x more room, same pricing`})]}):null}var fr,pr,mr,hr=e((()=>{fr=t(B(),1),Qe(),V(),rt(),_t(),lr(),pr=H(),mr=6}));function gr(){let e=Gt(),t=nt().oauthAccount?.displayName??``,{columns:r}=Ve(),i=kt(),a=ge.isSandboxingEnabled(),o=d(e=>e.agent),s=nt(),[c]=(0,_r.useState)(()=>{let e=tt().companyAnnouncements;if(!(!e||e.length===0))return s.numStartups===1?e[0]:e[Math.floor(Math.random()*e.length)]});(0,_r.useEffect)(()=>{i&&Ot()},[i]),!i&&n(process.env.CLAUDE_CODE_FORCE_FULL_LOGO);let l=ht(Lt()),{version:u,cwd:f,billingType:p,agentName:m}=Yt(),h=o??m,g=lt(l,vr-20);if(!i&&!n(process.env.CLAUDE_CODE_FORCE_FULL_LOGO))return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Yn,{}),(0,G.jsx)(dr,{}),qe()&&(0,G.jsxs)(R,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsx)(z,{color:`warning`,children:`Debug mode enabled`}),(0,G.jsxs)(z,{dimColor:!0,children:[`Logging to: `,Ze()?`stderr`:Xe()]})]}),(0,G.jsx)(Zn,{}),process.env.CLAUDE_CODE_TMUX_SESSION&&(0,G.jsxs)(R,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsxs)(z,{dimColor:!0,children:[`tmux session: `,process.env.CLAUDE_CODE_TMUX_SESSION]}),(0,G.jsx)(z,{dimColor:!0,children:process.env.CLAUDE_CODE_TMUX_PREFIX_CONFLICTS?`Detach: ${process.env.CLAUDE_CODE_TMUX_PREFIX} ${process.env.CLAUDE_CODE_TMUX_PREFIX} d (press prefix twice - Work Mate uses ${process.env.CLAUDE_CODE_TMUX_PREFIX})`:`Detach: ${process.env.CLAUDE_CODE_TMUX_PREFIX} d`})]}),c&&(0,G.jsxs)(R,{paddingLeft:2,flexDirection:`column`,children:[!process.env.IS_DEMO&&s.oauthAccount?.organizationName&&(0,G.jsxs)(z,{dimColor:!0,children:[`Message from `,s.oauthAccount.organizationName,`:`]}),(0,G.jsx)(z,{children:c})]})]});let _=Wt(r),v=Nt(nt().theme),y=` ${ze(`claude`,v)(`Work Mate`)} ${ze(`inactive`,v)(`v${u}`)} `,x=ze(`claude`,v)(` Work Mate `);if(_===`compact`){let e=Kt(t);L(e)>r-4&&(e=Kt(null));let n=h?r-4-1-L(h)-3:r-4,i=Qt(f,Math.max(n,10));return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(b,{children:(0,G.jsxs)(R,{flexDirection:`column`,borderStyle:`round`,borderColor:`claude`,borderText:{content:x,position:`top`,align:`start`,offset:1},paddingX:1,paddingY:1,alignItems:`center`,width:r,children:[(0,G.jsx)(z,{bold:!0,children:e}),(0,G.jsx)(R,{marginY:1,children:(0,G.jsx)(wn,{})}),(0,G.jsx)(z,{dimColor:!0,children:g}),(0,G.jsx)(z,{dimColor:!0,children:p}),(0,G.jsx)(z,{dimColor:!0,children:h?`@${h} · ${i}`:i})]})}),(0,G.jsx)(dr,{}),a&&(0,G.jsx)(R,{marginTop:1,flexDirection:`column`,children:(0,G.jsx)(z,{color:`warning`,children:`Your bash commands will be sandboxed. Disable with /sandbox.`})})]})}let S=Kt(t),C=!process.env.IS_DEMO&&s.oauthAccount?.organizationName?`${g} · ${p} · ${s.oauthAccount.organizationName}`:`${g} · ${p}`,w=h?vr-1-L(h)-3:vr,T=Qt(f,Math.max(w,10)),ee=h?`@${h} · ${T}`:T,{leftWidth:E,rightWidth:D}=Zt(r,_,Jt(S,ee,C));return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(b,{children:(0,G.jsx)(R,{flexDirection:`column`,borderStyle:`round`,borderColor:`claude`,borderText:{content:y,position:`top`,align:`start`,offset:3},children:(0,G.jsxs)(R,{flexDirection:_===`horizontal`?`row`:`column`,paddingX:1,gap:1,children:[(0,G.jsxs)(R,{flexDirection:`column`,width:E,justifyContent:`space-between`,alignItems:`center`,minHeight:9,children:[(0,G.jsx)(R,{marginTop:1,children:(0,G.jsx)(z,{bold:!0,children:S})}),(0,G.jsx)(wn,{}),(0,G.jsxs)(R,{flexDirection:`column`,alignItems:`center`,children:[(0,G.jsx)(z,{dimColor:!0,children:C}),(0,G.jsx)(z,{dimColor:!0,children:ee})]})]}),_===`horizontal`&&(0,G.jsx)(R,{height:`100%`,borderStyle:`single`,borderColor:`claude`,borderDimColor:!0,borderTop:!1,borderBottom:!1,borderLeft:!1}),_===`horizontal`&&(0,G.jsx)(An,{feeds:i?[Fn(Dt()),Pn(e)]:[Pn(e)],maxWidth:D})]})})}),(0,G.jsx)(dr,{}),qe()&&(0,G.jsxs)(R,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsx)(z,{color:`warning`,children:`Debug mode enabled`}),(0,G.jsxs)(z,{dimColor:!0,children:[`Logging to: `,Ze()?`stderr`:Xe()]})]}),(0,G.jsx)(Zn,{}),process.env.CLAUDE_CODE_TMUX_SESSION&&(0,G.jsxs)(R,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsxs)(z,{dimColor:!0,children:[`tmux session: `,process.env.CLAUDE_CODE_TMUX_SESSION]}),(0,G.jsx)(z,{dimColor:!0,children:process.env.CLAUDE_CODE_TMUX_PREFIX_CONFLICTS?`Detach: ${process.env.CLAUDE_CODE_TMUX_PREFIX} ${process.env.CLAUDE_CODE_TMUX_PREFIX} d (press prefix twice - Work Mate uses ${process.env.CLAUDE_CODE_TMUX_PREFIX})`:`Detach: ${process.env.CLAUDE_CODE_TMUX_PREFIX} d`})]}),c&&(0,G.jsxs)(R,{paddingLeft:2,flexDirection:`column`,children:[!process.env.IS_DEMO&&s.oauthAccount?.organizationName&&(0,G.jsxs)(z,{dimColor:!0,children:[`Message from `,s.oauthAccount.organizationName,`:`]}),(0,G.jsx)(z,{children:c})]}),a&&(0,G.jsx)(R,{paddingLeft:2,flexDirection:`column`,children:(0,G.jsx)(z,{color:`warning`,children:`Your bash commands will be sandboxed. Disable with /sandbox.`})})]})}var _r,G,vr,yr=e((()=>{V(),p(),qt(),ft(),En(),Nn(),In(),rt(),Pt(),et(),Ye(),_r=t(B(),1),At(),Xn(),u(),r(),nr(),hr(),N(),S(),Rt(),_t(),G=H(),vr=50}));function br({message:e,isTranscriptMode:t}){let n=e.message?.content,r=Array.isArray(n)?n:[];if(!(t&&e.type===`assistant`&&e.message?.model&&r.some(e=>e?.type===`text`)))return null;let i=e.message.model;return(0,xr.jsx)(R,{minWidth:L(i)+8,children:(0,xr.jsx)(z,{dimColor:!0,children:i})})}var xr,Sr=e((()=>{V(),xr=H()}));function Cr({message:e,isTranscriptMode:t}){if(!(t&&e.timestamp&&e.type===`assistant`&&Array.isArray(e.message.content)&&e.message.content.some(e=>e.type===`text`)))return null;let n=new Date(e.timestamp).toLocaleTimeString(`en-US`,{hour:`2-digit`,minute:`2-digit`,hour12:!0});return(0,wr.jsx)(R,{minWidth:L(n),children:(0,wr.jsx)(z,{dimColor:!0,children:n})})}var wr,Tr=e((()=>{V(),wr=H()}));function Er(e,t,n,r){for(let i=t+1;i<e.length;i++){let t=e[i];if(t?.type===`assistant`){let e=Nr(t.message.content);if(e?.type===`thinking`||e?.type===`redacted_thinking`||e?.type===`tool_use`&&(we(e.name,e.input,n).isCollapsible||r.has(e.id)))continue;return!0}if(!(t?.type===`system`||t?.type===`attachment`)&&!(t?.type===`user`&&Nr(t.message.content)?.type===`tool_result`)){if(t?.type===`grouped_tool_use`){let e=Nr(t.messages[0]?.message.content)?.input;if(we(t.toolName,e,n).isCollapsible)continue}return!0}}return!1}function Dr({message:e,isUserContinuation:t,hasContentAfter:n,tools:r,commands:i,verbose:a,inProgressToolUseIDs:o,streamingToolUseIDs:s,screen:c,canAnimate:l,lastThinkingBlockId:u,latestBashOutputUUID:d,columns:f,isLoading:p,lookups:m,shouldCollapseDiffs:h}){let g=c===`transcript`,_=e.type===`grouped_tool_use`,v=e.type===`collapsed_read_search`,y=v&&(ie(e,o)||p&&!n),x=_?e.displayMessage:v?E(e):e,S=_||v?[]:_e(e,m),C=qi(e,s,o,_||v?I:be(e,m),c,m),w=!1;if(l)if(_)w=e.messages.some(e=>{let t=Nr(e.message.content);return t?.type===`tool_use`&&o.has(t.id)});else if(v)w=ie(e,o);else{let t=je(e);w=!t||o.has(t)}let T=g&&x.type===`assistant`&&Array.isArray(x.message.content)&&x.message.content.some(e=>e.type===`text`)&&(x.timestamp||x.message.model),ee=(0,Mr.jsx)(te,{message:e,lookups:m,addMargin:!T,containerWidth:T?void 0:f,tools:r,commands:i,verbose:a,inProgressToolUseIDs:o,progressMessagesForMessage:S,shouldAnimate:w,shouldShowDot:!0,isTranscriptMode:g,isStatic:C,isActiveCollapsedGroup:y,isUserContinuation:t,lastThinkingBlockId:u,latestBashOutputUUID:d,shouldCollapseDiffs:h});return T?(0,Mr.jsx)(b,{children:(0,Mr.jsxs)(R,{width:f,flexDirection:`column`,children:[(0,Mr.jsxs)(R,{flexDirection:`row`,justifyContent:`flex-end`,gap:1,marginTop:1,children:[(0,Mr.jsx)(Cr,{message:x,isTranscriptMode:g}),(0,Mr.jsx)(br,{message:x,isTranscriptMode:g})]}),ee]})}):(0,Mr.jsx)(b,{children:ee})}function Or(e,t){if(e.type===`grouped_tool_use`)return e.messages.some(e=>{let n=Nr(e.message.content);return n?.type===`tool_use`&&t.has(n.id)});if(e.type===`collapsed_read_search`)return ke(e).some(e=>t.has(e));let n=je(e);return!!n&&t.has(n)}function kr(e,t){if(e.type===`grouped_tool_use`)return e.messages.every(e=>{let n=Nr(e.message.content);return n?.type===`tool_use`&&t.has(n.id)});if(e.type===`collapsed_read_search`)return ke(e).every(e=>t.has(e));if(e.type===`assistant`){let n=Nr(e.message.content);if(n?.type===`server_tool_use`)return t.has(n.id)}let n=je(e);return!n||t.has(n)}function Ar(e,t){if(e.message!==t.message||e.screen!==t.screen||e.verbose!==t.verbose||e.message.type===`collapsed_read_search`&&t.screen!==`transcript`||e.columns!==t.columns||e.latestBashOutputUUID===e.message.uuid!=(t.latestBashOutputUUID===t.message.uuid)||e.lastThinkingBlockId!==t.lastThinkingBlockId&&ve(t.message))return!1;let n=Or(e.message,e.streamingToolUseIDs),r=kr(e.message,e.lookups.resolvedToolUseIDs);return!(n||!r)}var jr,Mr,Nr,Pr,Fr=e((()=>{jr=t(B(),1),V(),F(),se(),xe(),Mr=H(),Sr(),ta(),Tr(),u(),Nr=e=>{if(!Array.isArray(e))return;let t=e[0];if(!(t==null||typeof t==`string`))return t},Pr=jr.memo(Dr,Ar)}));function Ir(e){return e.type===`attachment`&&Lr.has(e.attachment.type)}var Lr,Rr=e((()=>{Lr=new Set(`hook_success.hook_additional_context.hook_cancelled.command_permissions.agent_mention.budget_usd.critical_system_reminder.edited_image_file.edited_text_file.opened_file_in_ide.output_style.plan_mode.plan_mode_exit.plan_mode_reentry.structured_output.todo_reminder.context_efficiency.deferred_tools_delta.mcp_instructions_delta.token_usage.max_turns_reached.task_reminder.auto_mode.auto_mode_exit.output_token_usage.verify_plan_reminder.current_session_memory.compaction_reminder.date_change`.split(`.`))}));function zr(e){return Gr.filter(t=>t.isActive(e))}var K,Br,Vr,Hr,Ur,Wr,Gr,Kr=e((()=>{V(),Oe(),i(),Ge(),ft(),gt(),Ht(),K=H(),Br={id:`large-memory-files`,type:`warning`,isActive:e=>De(e.memoryFiles).length>0,render:e=>(0,K.jsx)(K.Fragment,{children:De(e.memoryFiles).map(e=>{let t=e.path.startsWith(Ke())?en(Ke(),e.path):e.path;return(0,K.jsxs)(R,{flexDirection:`row`,children:[(0,K.jsx)(z,{color:`warning`,children:a.warning}),(0,K.jsxs)(z,{color:`warning`,children:[`Large `,(0,K.jsx)(z,{bold:!0,children:t}),` will impact performance (`,ut(e.content.length),` chars > `,ut(ce),`)`,(0,K.jsx)(z,{dimColor:!0,children:` · /memory to edit`})]})]},e.path)})})},Vr={id:`claude-ai-external-token`,type:`warning`,isActive:()=>{let e=St();return wt()&&(e.source===`ANTHROPIC_AUTH_TOKEN`||e.source===`apiKeyHelper`)},render:()=>{let e=St();return(0,K.jsxs)(R,{flexDirection:`row`,marginTop:1,children:[(0,K.jsx)(z,{color:`warning`,children:a.warning}),(0,K.jsxs)(z,{color:`warning`,children:[`Auth conflict: Using `,e.source,` instead of Work Mate account subscription token. Either unset`,` `,e.source,", or run `claude /logout`."]})]})}},Hr={id:`api-key-conflict`,type:`warning`,isActive:()=>{let{source:e}=xt({skipRetrievingKeyFromApiKeyHelper:!0});return!!Ct()&&(e===`ANTHROPIC_API_KEY`||e===`apiKeyHelper`)},render:()=>{let{source:e}=xt({skipRetrievingKeyFromApiKeyHelper:!0});return(0,K.jsxs)(R,{flexDirection:`row`,marginTop:1,children:[(0,K.jsx)(z,{color:`warning`,children:a.warning}),(0,K.jsxs)(z,{color:`warning`,children:[`Auth conflict: Using `,e,` instead of Console key. Either unset `,e,", or run `claude /logout`."]})]})}},Ur={id:`both-auth-methods`,type:`warning`,isActive:()=>{let{source:e}=xt({skipRetrievingKeyFromApiKeyHelper:!0}),t=St();return e!==`none`&&t.source!==`none`&&!(e===`apiKeyHelper`&&t.source===`apiKeyHelper`)},render:()=>{let{source:e}=xt({skipRetrievingKeyFromApiKeyHelper:!0}),t=St();return(0,K.jsxs)(R,{flexDirection:`column`,marginTop:1,children:[(0,K.jsxs)(R,{flexDirection:`row`,children:[(0,K.jsx)(z,{color:`warning`,children:a.warning}),(0,K.jsxs)(z,{color:`warning`,children:[`Auth conflict: Both a token (`,t.source,`) and an API key (`,e,`) are set. This may lead to unexpected behavior.`]})]}),(0,K.jsxs)(R,{flexDirection:`column`,marginLeft:3,children:[(0,K.jsxs)(z,{color:`warning`,children:[`· Trying to use `,t.source===`claude.ai`?`claude.ai`:t.source,`?`,` `,e===`ANTHROPIC_API_KEY`?`Unset the ANTHROPIC_API_KEY environment variable, or claude /logout then say "No" to the API key approval before login.`:e===`apiKeyHelper`?`Unset the apiKeyHelper setting.`:`claude /logout`]}),(0,K.jsxs)(z,{color:`warning`,children:[`· Trying to use `,e,`?`,` `,t.source===`claude.ai`?`claude /logout to sign out of claude.ai.`:`Unset the ${t.source} environment variable.`]})]})]})}},Wr={id:`large-agent-descriptions`,type:`warning`,isActive:e=>Vt(e.agentDefinitions)>Ut,render:e=>{let t=Vt(e.agentDefinitions);return(0,K.jsxs)(R,{flexDirection:`row`,children:[(0,K.jsx)(z,{color:`warning`,children:a.warning}),(0,K.jsxs)(z,{color:`warning`,children:[`Large cumulative agent descriptions will impact performance (~`,ut(t),` tokens > `,ut(Ut),`)`,(0,K.jsx)(z,{dimColor:!0,children:` · /agents to manage`})]})]})}},Gr=[Br,Wr,Vr,Hr,Ur]}));function qr({agentDefinitions:e}={}){let t={config:nt(),agentDefinitions:e,memoryFiles:(0,Yr.use)(Me())},n=zr(t);return n.length===0?null:(0,Xr.jsx)(R,{flexDirection:`column`,paddingLeft:1,children:n.map(e=>(0,Xr.jsx)(Jr.Fragment,{children:e.render(t)},e.id))})}var Jr,Yr,Xr,Zr=e((()=>{Jr=t(B(),1),Yr=t(B(),1),V(),Oe(),rt(),Kr(),Xr=H()}));function Qr(e,t,n){let r=(0,q.useRef)(new Map),i=(0,q.useRef)(0),a=(0,q.useRef)(0),o=(0,q.useRef)({arr:new Float64Array,version:-1,n:-1}),s=(0,q.useRef)(new Map),c=(0,q.useRef)(new Map),l=(0,q.useRef)(n),u=(0,q.useRef)(!1),d=(0,q.useRef)(null),f=(0,q.useRef)(0);if(l.current!==n){let e=l.current/n;l.current=n;for(let[t,n]of r.current)r.current.set(t,Math.max(1,Math.round(n*e)));i.current++,u.current=!0,f.current=2}let p=f.current>0?d.current:null,m=(0,q.useRef)(0),h=(0,q.useRef)(null);(0,q.useSyncExternalStore)((0,q.useCallback)(t=>e.current?.subscribe(t)??oi,[e]),()=>{let t=e.current;if(!t)return NaN;let n=t.getScrollTop()+t.getPendingDelta(),r=Math.floor(n/ni);return t.isSticky()?~r:r});let g=e.current?.getScrollTop()??-1,_=e.current?.getPendingDelta()??0,v=e.current?.getViewportHeight()??0,y=e.current?.isSticky()??!0;(0,q.useMemo)(()=>{let e=new Set(t),n=!1;for(let t of r.current.keys())e.has(t)||(r.current.delete(t),n=!0);for(let t of c.current.keys())e.has(t)||c.current.delete(t);n&&i.current++},[t]);let b=t.length;if(o.current.version!==i.current||o.current.n!==b){let e=o.current.arr.length>=b+1?o.current.arr:new Float64Array(b+1);e[0]=0;for(let n=0;n<b;n++)e[n+1]=e[n]+(r.current.get(t[n])??$r);o.current={arr:e,version:i.current,n:b}}let x=o.current.arr,S=x[b],C,w;if(p)[C,w]=p,C=Math.min(C,b),w=Math.min(w,b);else if(v===0||g<0)C=Math.max(0,b-ti),w=b;else{if(y){let e=v+ei;for(C=b;C>0&&S-x[C-1]<e;)C--;w=b}else{let e=m.current,n=v*3,i=Math.min(g,g+_),a=Math.max(g,g+_),o=a-i,c=o>n&&_<0?a-n:i,l=c+Math.min(o,n),u=Math.max(0,c-e),f=l-e,p=u-ei;{let e=0,t=b;for(;e<t;){let n=e+t>>1;x[n+1]<=p?e=n+1:t=n}C=e}{let e=d.current;if(e&&e[0]<C)for(let n=e[0];n<Math.min(C,e[1]);n++){let e=t[n];if(s.current.has(e)&&!r.current.has(e)){C=n;break}}}let h=v+2*ei,y=Math.min(b,C+ii),S=0;for(w=C;w<y&&(S<h||x[w]<f+v+ei);)S+=r.current.get(t[w])??ri,w++}let e=v+2*ei,n=Math.max(0,w-ii),i=0;for(let e=C;e<w;e++)i+=r.current.get(t[e])??ri;for(;C>n&&i<e;)C--,i+=r.current.get(t[C])??ri;let o=d.current,c=Math.abs(g-a.current)+Math.abs(_);if(o&&c>v*2){let[e,t]=o;C<e-ai&&(C=e-ai),w>t+ai&&(w=t+ai),C>w&&(w=Math.min(C+ai,b))}a.current=g}f.current>0?f.current--:d.current=[C,w];let T=(0,q.useDeferredValue)(C),ee=(0,q.useDeferredValue)(w),E=C<T?T:C,D=w>ee?ee:w;if((E>D||y)&&(E=C,D=w),_>0&&(D=w),D-E>ii){let e=(x[E]+x[D])/2;g-m.current<e?D=E+ii:E=D-ii}let te=m.current,ne=x[E],re=E===0?0:ne+te,ie=D===b?1/0:Math.max(ne,x[D]-v)+te;(0,q.useLayoutEffect)(()=>{y?e.current?.setClampBounds(void 0,void 0):e.current?.setClampBounds(re,ie)}),(0,q.useLayoutEffect)(()=>{let e=h.current?.yogaNode;if(e&&e.getComputedWidth()>0&&(m.current=e.getComputedTop()),u.current){u.current=!1;return}let t=!1;for(let[e,n]of s.current){let i=n.yogaNode;if(!i)continue;let a=i.getComputedHeight(),o=r.current.get(e);a>0?o!==a&&(r.current.set(e,a),t=!0):i.getComputedWidth()>0&&o!==0&&(r.current.set(e,0),t=!0)}t&&i.current++});let ae=(0,q.useCallback)(e=>{let t=c.current.get(e);return t||(t=t=>{if(t)s.current.set(e,t);else{let t=s.current.get(e)?.yogaNode;if(t&&!u.current){let n=t.getComputedHeight();(n>0||t.getComputedWidth()>0)&&r.current.get(e)!==n&&(r.current.set(e,n),i.current++)}s.current.delete(e)}},c.current.set(e,t)),t},[]),oe=(0,q.useCallback)(e=>{let n=s.current.get(t[e])?.yogaNode;return!n||n.getComputedWidth()===0?-1:n.getComputedTop()},[t]),se=(0,q.useCallback)(e=>s.current.get(t[e])??null,[t]),O=(0,q.useCallback)(e=>r.current.get(t[e]),[t]),k=(0,q.useCallback)(t=>{let n=o.current;t<0||t>=n.n||e.current?.scrollTo(n.arr[t]+m.current)},[e]),A=S-x[D];return{range:[E,D],topSpacer:ne,bottomSpacer:A,measureRef:ae,spacerRef:h,offsets:x,getItemTop:oe,getItemElement:se,getItemHeight:O,scrollToIndex:k}}var q,$r,ei,ti,ni,ri,ii,ai,oi,si=e((()=>{q=t(B(),1),$r=3,ei=40,ti=30,ni=20,ri=1,ii=200,ai=25,oi=()=>{}}));function ci({children:e}){let[t,n]=(0,J.useState)(null),[r,i]=(0,J.useState)(null);return(0,pi.jsx)(hi.Provider,{value:n,children:(0,pi.jsx)(_i.Provider,{value:i,children:(0,pi.jsx)(mi.Provider,{value:t,children:(0,pi.jsx)(gi.Provider,{value:r,children:e})})})})}function li(){return(0,J.useContext)(mi)}function ui(){return(0,J.useContext)(gi)}function di(e){let t=(0,J.useContext)(hi);(0,J.useEffect)(()=>{if(t)return t(e),()=>t(null)},[t,e])}function fi(e){let t=(0,J.useContext)(_i);(0,J.useEffect)(()=>{if(t)return t(e),()=>t(null)},[t,e])}var J,pi,mi,hi,gi,_i,vi=e((()=>{J=t(B(),1),pi=H(),mi=(0,J.createContext)(null),hi=(0,J.createContext)(null),gi=(0,J.createContext)(null),_i=(0,J.createContext)(null)}));function yi(e){let[t,n]=(0,Y.useState)(null),r=(0,Y.useRef)(e);r.current=e;let i=(0,Y.useRef)(null),a=(0,Y.useCallback)(()=>{n(null)},[]),o=(0,Y.useCallback)(e=>{let t=Math.max(0,e.getScrollHeight()-e.getViewportHeight());e.getScrollTop()+e.getPendingDelta()>=t||i.current===null&&(i.current=e.getScrollHeight(),n(r.current))},[]),s=(0,Y.useCallback)(e=>{e&&e.scrollToBottom()},[]);return(0,Y.useEffect)(()=>{t===null?i.current=null:e<t&&(i.current=null,n(null))},[e,t]),{dividerIndex:t,dividerYRef:i,onScrollAway:o,onRepin:a,jumpToNew:s,shiftDivider:(0,Y.useCallback)((e,t)=>{n(t=>t===null?null:t+e),i.current!==null&&(i.current+=t)},[])}}function bi(e,t){let n=0,r=!1;for(let i=t;i<e.length;i++){let t=e[i];if(t.type===`progress`||t.type===`assistant`&&!xi(t))continue;let a=t.type===`assistant`;a&&!r&&n++,r=a}return n}function xi(e){if(e.type!==`assistant`||!Array.isArray(e.message.content))return!1;for(let t of e.message.content)if(typeof t!=`string`&&t.type===`text`&&t.text.trim()!==``)return!0;return!1}function Si(e,t){if(t===null)return;let n=t;for(;n<e.length&&(e[n]?.type===`progress`||Ir(e[n]));)n++;let r=e[n]?.uuid;if(!r)return;let i=bi(e,t);return{firstUnseenUuid:r,count:Math.max(1,i)}}function Ci({scrollable:e,bottom:t,overlay:n,bottomFloat:r,modal:i,modalScrollRef:a,scrollRef:o,dividerYRef:c,hidePill:l=!1,hideSticky:u=!1,newMessageCount:d=0,onPillClick:f}){let{rows:p,columns:m}=Ve(),[h,g]=(0,Y.useState)(null),_=(0,Y.useMemo)(()=>({setStickyPrompt:g}),[]),v=(0,Y.useSyncExternalStore)((0,Y.useCallback)(e=>o?.current?.subscribe(e)??(()=>{}),[o]),()=>{let e=o?.current,t=c?.current;return!e||t==null?!1:e.getScrollTop()+e.getPendingDelta()+e.getViewportHeight()<t});if((0,Y.useLayoutEffect)(()=>{if(!Ae())return;let e=Ie.get(process.stdout);if(e)return e.onHyperlinkClick=e=>{if(e.startsWith(`file:`))try{de(tn(e))}catch{}else s(e)},()=>{e.onHyperlinkClick=void 0}},[]),Ae()){let s=u?null:h,c=s!=null&&s!==`clicked`&&n==null?s:null,g=s!=null&&n==null;return(0,X.jsxs)(ci,{children:[(0,X.jsx)(R,{flexDirection:`row`,flexGrow:1,overflow:`hidden`,width:`100%`,children:(0,X.jsxs)(R,{flexDirection:`column`,flexGrow:1,width:m,overflow:`hidden`,children:[(0,X.jsxs)(R,{flexGrow:1,flexDirection:`column`,overflow:`hidden`,children:[c&&(0,X.jsx)(Ti,{text:c.text,onClick:c.scrollTo}),(0,X.jsxs)(He,{ref:o,flexGrow:1,flexDirection:`column`,paddingTop:+!g,stickyScroll:!0,children:[(0,X.jsx)(ki,{value:_,children:e}),n]}),!l&&v&&n==null&&(0,X.jsx)(wi,{count:d,onClick:f}),r!=null&&(0,X.jsx)(R,{position:`absolute`,bottom:0,right:0,opaque:!0,children:r})]}),(0,X.jsxs)(R,{flexDirection:`column`,flexShrink:0,width:`100%`,maxHeight:`50%`,children:[(0,X.jsx)(Ei,{}),(0,X.jsx)(Di,{}),(0,X.jsx)(R,{flexDirection:`column`,width:`100%`,flexGrow:1,overflowY:`hidden`,children:t})]})]})}),i!=null&&(0,X.jsx)(Bt,{value:{rows:p-Oi-1,columns:m-4,scrollRef:a??null},children:(0,X.jsxs)(R,{position:`absolute`,bottom:0,left:0,right:0,maxHeight:p-Oi,flexDirection:`column`,overflow:`hidden`,opaque:!0,children:[(0,X.jsx)(R,{flexShrink:0,children:(0,X.jsx)(z,{color:`permission`,children:`▔`.repeat(m)})}),(0,X.jsx)(R,{flexDirection:`column`,paddingX:2,flexShrink:0,overflow:`hidden`,children:i})]})})]})}return(0,X.jsxs)(X.Fragment,{children:[e,t,n,i]})}function wi({count:e,onClick:t}){let[n,r]=(0,Y.useState)(!1);return(0,X.jsx)(R,{position:`absolute`,bottom:0,left:0,right:0,justifyContent:`center`,children:(0,X.jsx)(R,{onClick:t,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:(0,X.jsxs)(z,{backgroundColor:n?`userMessageBackgroundHover`:`userMessageBackground`,dimColor:!0,children:[` `,e>0?`${e} new ${pt(e,`message`)}`:`Jump to bottom`,` `,a.arrowDown,` `]})})})}function Ti({text:e,onClick:t}){let[n,r]=(0,Y.useState)(!1);return(0,X.jsx)(R,{flexShrink:0,width:`100%`,height:1,paddingRight:1,backgroundColor:n?`userMessageBackgroundHover`:`userMessageBackground`,onClick:t,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:(0,X.jsxs)(z,{color:`subtle`,wrap:`truncate-end`,children:[a.pointer,` `,e]})})}function Ei(){let e=li();return!e||e.suggestions.length===0?null:(0,X.jsx)(R,{position:`absolute`,bottom:`100%`,left:0,right:0,paddingX:2,paddingTop:1,flexDirection:`column`,opaque:!0,children:(0,X.jsx)(Ft,{suggestions:e.suggestions,selectedSuggestion:e.selectedSuggestion,maxColumnWidth:e.maxColumnWidth,overlay:!0})})}function Di(){let e=ui();return e?(0,X.jsx)(R,{position:`absolute`,bottom:`100%`,left:0,right:0,opaque:!0,children:e}):null}var Y,X,Oi,ki,Ai=e((()=>{i(),Y=t(B(),1),zt(),vi(),p(),V(),M(),Te(),mt(),Rr(),It(),X=H(),Oi=2,ki=(0,Y.createContext)({setStickyPrompt:()=>{}})}));function ji(e){let t=zi.get(e);if(t!==void 0)return t;let n=gn(e);return zi.set(e,n),n}function Mi(e){let t=Vi.get(e);if(t!==void 0)return t;let n=Ni(e);return Vi.set(e,n),n}function Ni(e){let t=null;if(e.type===`user`){if(e.isMeta||e.isVisibleInTranscriptOnly)return null;let n=e.message.content[0];if(n?.type!==`text`)return null;t=n.text??null}else if(e.type===`attachment`&&e.attachment.type===`queued_command`&&e.attachment.commandMode!==`task-notification`&&!e.attachment.isMeta){let n=e.attachment.prompt;t=typeof n==`string`?n:n.flatMap(e=>e.type===`text`?[e.text??``]:[]).join(`
|
|
10
|
-
`)}if(t===null)return null;let n=h(t);return n.startsWith(`<`)||n===``?null:n}function Pi({itemKey:e,msg:t,idx:n,measureRef:r,expanded:i,hovered:a,clickable:o,onClickK:s,onEnterK:c,onLeaveK:l,renderItem:u}){return(0,Li.jsx)(R,{ref:r(e),flexDirection:`column`,backgroundColor:i?`userMessageBackgroundHover`:void 0,paddingBottom:i?1:void 0,onClick:o?e=>s(t,e.cellIsBlank):void 0,onMouseEnter:o?()=>c(e):void 0,onMouseLeave:o?()=>l(e):void 0,children:(0,Li.jsx)(Pe.Provider,{value:a&&!i?`text`:void 0,children:u(t,n)})})}function Fi({messages:e,scrollRef:t,columns:n,itemKey:r,renderItem:i,onItemClick:a,isItemClickable:o,isItemExpanded:s,extractSearchText:c=ji,trackStickyPrompt:l,selectedIndex:u,cursorNavRef:d,setCursor:p,jumpRef:m,onSearchMatchesChange:h,scanElement:_,setPositions:v}){let y=(0,Z.useRef)([]),b=(0,Z.useRef)(e),x=(0,Z.useRef)(r);if(x.current!==r||e.length<y.current.length||e[0]!==b.current[0])y.current=e.map(e=>r(e));else for(let t=y.current.length;t<e.length;t++)y.current.push(r(e[t]));b.current=e,x.current=r;let S=y.current,{range:C,topSpacer:w,bottomSpacer:T,measureRef:ee,spacerRef:E,offsets:D,getItemTop:te,getItemElement:ne,getItemHeight:re,scrollToIndex:ie}=Qr(t,S,n),[ae,oe]=C,se=(0,Z.useCallback)(t=>re(t)!==0&&f(e[t]),[re,e]);(0,Z.useImperativeHandle)(d,()=>{let n=e=>p?.({uuid:e.uuid,msgType:e.type,expanded:!1,toolName:g(e)?.name}),r=u??-1,i=(t,r,i=se)=>{for(let a=t;a>=0&&a<e.length;a+=r)if(i(a))return n(e[a]),!0;return!1},a=t=>se(t)&&e[t].type===`user`;return{enterCursor:()=>i(e.length-1,-1,a),navigatePrev:()=>i(r-1,-1),navigateNext:()=>{i(r+1,1)||(t.current?.scrollToBottom(),p?.(null))},navigatePrevUser:()=>i(r-1,-1,a),navigateNextUser:()=>i(r+1,1,a),navigateTop:()=>i(0,1),navigateBottom:()=>i(e.length-1,-1),getSelected:()=>r>=0?e[r]??null:null}},[e,u,p,se]);let O=(0,Z.useRef)({offsets:D,start:ae,getItemElement:ne,getItemTop:te,messages:e,scrollToIndex:ie});O.current={offsets:D,start:ae,getItemElement:ne,getItemTop:te,messages:e,scrollToIndex:ie},(0,Z.useEffect)(()=>{if(u===void 0)return;let e=O.current,n=e.getItemElement(u);n?t.current?.scrollToElement(n,1):e.scrollToIndex(u)},[u,t]);let k=(0,Z.useRef)(null),A=(0,Z.useRef)({msgIdx:-1,positions:[]}),j=(0,Z.useRef)(-1),ce=(0,Z.useRef)(0),le=(0,Z.useRef)(0),ue=(0,Z.useRef)(()=>{}),de=(0,Z.useRef)(()=>{}),M=(0,Z.useRef)({matches:[],ptr:0,screenOrd:0,prefixSum:[]}),N=(0,Z.useRef)(-1),fe=(0,Z.useRef)(!1);function pe(e){let t=O.current.getItemTop(e);return Math.max(0,t-Ri)}function P(e){let n=t.current,{msgIdx:r,positions:i}=A.current;if(!n||i.length===0||r<0){v?.(null);return}let a=Math.max(0,Math.min(e,i.length-1)),o=i[a],s=O.current.getItemTop(r),c=n.getViewportTop(),l=s-n.getScrollTop(),u=n.getViewportHeight(),d=c+l+o.row;(d<c||d>=c+u)&&(n.scrollTo(Math.max(0,s+o.row-Ri)),l=s-n.getScrollTop(),d=c+l+o.row),v?.({positions:i,rowOffset:c+l,currentIdx:a});let f=M.current,p=f.prefixSum.at(-1)??0,m=(f.prefixSum[f.ptr]??0)+a+1;h?.(p,m),Je(`highlight(i=${r}, ord=${a}/${i.length}): pos={row:${o.row},col:${o.col}} lo=${l} screenRow=${d} badge=${m}/${p}`)}de.current=P;let[me,he]=(0,Z.useState)(0),ge=(0,Z.useCallback)(()=>he(e=>e+1),[]);(0,Z.useEffect)(()=>{let e=k.current;if(!e)return;let{idx:n,wantLast:r,tries:i}=e,a=t.current;if(!a)return;let{getItemElement:o,getItemTop:s,scrollToIndex:c}=O.current,l=o(n),u=l?.yogaNode?.getComputedHeight()??0;if(!l||u===0){if(i>1){k.current=null,Je(`seek(i=${n}): no mount after scrollToIndex, skip`),ue.current(r?-1:1);return}k.current={idx:n,wantLast:r,tries:i+1},c(n),ge();return}k.current=null,a.scrollTo(Math.max(0,s(n)-Ri));let d=_?.(l)??[];if(A.current={msgIdx:n,positions:d},Je(`seek(i=${n} t=${i}): ${d.length} positions`),d.length===0){if(++ce.current>20){ce.current=0;return}ue.current(r?-1:1);return}ce.current=0;let f=r?d.length-1:0;M.current.screenOrd=f,j.current=-1,de.current(f);let p=le.current;p&&(le.current=0,ue.current(p))},[me]);function _e(e,n){let r=t.current;if(!r)return;let i=O.current,{getItemElement:a,scrollToIndex:o}=i;if(e<0||e>=i.messages.length)return;v?.(null),A.current={msgIdx:-1,positions:[]},k.current={idx:e,wantLast:n,tries:0};let s=a(e),c=s?.yogaNode?.getComputedHeight()??0;s&&c>0?r.scrollTo(pe(e)):o(e),ge()}function ve(e){let t=M.current,{matches:n,prefixSum:r}=t,i=r.at(-1)??0;if(n.length===0)return;if(k.current){le.current=e;return}j.current<0&&(j.current=t.ptr);let{positions:a}=A.current,o=t.screenOrd+e;if(o>=0&&o<a.length){t.screenOrd=o,P(o),j.current=-1;return}let s=(t.ptr+e+n.length)%n.length;if(s===j.current){v?.(null),j.current=-1,Je(`step: wraparound at ptr=${s}, all ${n.length} msgs phantoms`);return}t.ptr=s,t.screenOrd=0,_e(n[s],e<0);let c=e<0?r[s+1]??i:r[s]+1;h?.(i,c)}ue.current=ve,(0,Z.useImperativeHandle)(m,()=>({jumpToIndex:e=>{let n=t.current;n&&n.scrollTo(pe(e))},setSearchQuery:e=>{k.current=null,A.current={msgIdx:-1,positions:[]},j.current=-1,v?.(null);let n=e.toLowerCase(),r=[],i=[0];if(n){let e=O.current.messages;for(let t=0;t<e.length;t++){let a=c(e[t]),o=a.indexOf(n),s=0;for(;o>=0;)s++,o=a.indexOf(n,o+n.length);s>0&&(r.push(t),i.push(i.at(-1)+s))}}let a=i.at(-1),o=0,s=t.current,{offsets:l,start:u,getItemTop:d}=O.current,f=d(u),p=f>=0?f-l[u]:0;if(r.length>0&&s){let t=N.current>=0?N.current:s.getScrollTop(),n=1/0;for(let e=0;e<r.length;e++){let i=Math.abs(p+l[r[e]]-t);i<=n&&(n=i,o=e)}Je(`setSearchQuery('${e}'): ${r.length} msgs · ptr=${o} msgIdx=${r[o]} curTop=${t} origin=${p}`)}M.current={matches:r,ptr:o,screenOrd:0,prefixSum:i},r.length>0?_e(r[o],!0):N.current>=0&&s&&s.scrollTo(N.current),h?.(a,r.length>0?i[o+1]??a:0)},nextMatch:()=>ve(1),prevMatch:()=>ve(-1),setAnchor:()=>{let e=t.current;e&&(N.current=e.getScrollTop())},disarmSearch:()=>{v?.(null),k.current=null,A.current={msgIdx:-1,positions:[]},j.current=-1},warmSearchIndex:async()=>{if(fe.current)return 0;let e=O.current.messages,t=0,n=performance.now();for(let n=0;n<e.length;n+=500){await bt(0);let r=performance.now(),i=Math.min(n+500,e.length);for(let t=n;t<i;t++)c(e[t]);t+=performance.now()-r}let r=Math.round(performance.now()-n);return Je(`warmSearchIndex: ${e.length} msgs · work=${Math.round(t)}ms wall=${r}ms chunks=${Math.ceil(e.length/500)}`),fe.current=!0,Math.round(t)}}),[t]);let[ye,be]=(0,Z.useState)(null),xe=(0,Z.useRef)({onItemClick:a,setHoveredKey:be});xe.current={onItemClick:a,setHoveredKey:be};let Se=(0,Z.useCallback)((e,t)=>{let n=xe.current;!t&&n.onItemClick&&n.onItemClick(e)},[]),Ce=(0,Z.useCallback)(e=>{xe.current.setHoveredKey(e)},[]),we=(0,Z.useCallback)(e=>{xe.current.setHoveredKey(t=>t===e?null:t)},[]);return(0,Li.jsxs)(Li.Fragment,{children:[(0,Li.jsx)(R,{ref:E,height:w,flexShrink:0}),e.slice(ae,oe).map((e,t)=>{let n=ae+t,r=S[n],c=!!a&&(o?.(e)??!0),l=c&&ye===r,u=s?.(e);return(0,Li.jsx)(Pi,{itemKey:r,msg:e,idx:n,measureRef:ee,expanded:u,hovered:l,clickable:c,onClickK:Se,onEnterK:Ce,onLeaveK:we,renderItem:i},r)}),T>0&&(0,Li.jsx)(R,{height:T,flexShrink:0}),l&&(0,Li.jsx)(Ii,{messages:e,start:ae,end:oe,offsets:D,getItemTop:te,getItemElement:ne,scrollRef:t})]})}function Ii({messages:e,start:t,end:n,offsets:r,getItemTop:i,getItemElement:a,scrollRef:o}){let{setStickyPrompt:s}=(0,Z.useContext)(ki);(0,Z.useSyncExternalStore)((0,Z.useCallback)(e=>o.current?.subscribe(e)??Hi,[o]),()=>{let e=o.current;if(!e)return NaN;let t=e.getScrollTop()+e.getPendingDelta();return e.isSticky()?-1-t:t});let c=o.current?.isSticky()??!0,l=Math.max(0,(o.current?.getScrollTop()??0)+(o.current?.getPendingDelta()??0)),u=t,d=-1;for(let e=n-1;e>=t;e--){let t=i(e);if(t>=0){if(t<l)break;d=t}u=e}let f=-1,p=null;if(u>0&&!c)for(let t=u-1;t>=0;t--){let n=Mi(e[t]);if(n===null)continue;let r=i(t);if(!(r>=0&&r+1>=l)){f=t,p=n;break}}let m=d>=0?d-r[u]:0,h=f>=0?Math.max(0,m+r[f]):-1,g=(0,Z.useRef)({idx:-1,tries:0}),_=(0,Z.useRef)(`none`),v=(0,Z.useRef)(-1);return(0,Z.useEffect)(()=>{if(g.current.idx>=0)return;if(_.current===`armed`){_.current=`force`;return}let e=_.current===`force`;if(_.current=`none`,!e&&v.current===f)return;if(v.current=f,p===null){s(null);return}let t=p.trimStart(),n=t.search(/\n\s*\n/),r=(n>=0?t.slice(0,n):t).slice(0,Bi).replace(/\s+/g,` `).trim();if(r===``){s(null);return}let i=f,c=h;s({text:r,scrollTo:()=>{s(`clicked`),_.current=`armed`;let e=a(i);e?o.current?.scrollToElement(e,1):(o.current?.scrollTo(c),g.current={idx:i,tries:0})}})}),(0,Z.useEffect)(()=>{if(g.current.idx<0)return;let e=a(g.current.idx);e?(o.current?.scrollToElement(e,1),g.current={idx:-1,tries:0}):++g.current.tries>5&&(g.current={idx:-1,tries:0})}),null}var Z,Li,Ri,zi,Bi,Vi,Hi,Ui=e((()=>{Z=t(B(),1),si(),V(),ye(),Ai(),Li=H(),Ye(),yt(),Cn(),v(),Ri=3,zi=new WeakMap,Bi=500,Vi=new WeakMap,Hi=()=>{}}));function Wi(e,t,n=Zi,r=Qi){let i=t.current,a=i?e.findIndex(e=>e.uuid===i.uuid):-1,o=a>=0?a:i?Math.min(i.idx,Math.max(0,e.length-n)):0;e.length-o>n+r&&(o=e.length-n);let s=e[o];return s&&(i?.uuid!==s.uuid||i.idx!==o)?t.current={uuid:s.uuid,idx:o}:!s&&i&&(t.current=null),o}function Gi(e){return(e.type===`assistant`||e.type===`user`?je(e):null)??e.uuid}function Ki(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function qi(e,t,n,r,i,a){if(i===`transcript`)return!0;switch(e.type){case`attachment`:case`user`:case`assistant`:{if(e.type===`assistant`){let t=e.message.content[0];if(t?.type===`server_tool_use`)return a.resolvedToolUseIDs.has(t.id)}let i=je(e);return i?t.has(i)||n.has(i)||fe(i,`PostToolUse`,a)?!1:nn(r,a.resolvedToolUseIDs):!0}case`system`:return e.subtype!==`api_error`;case`grouped_tool_use`:return e.messages.every(e=>{let t=e.message.content[0];return t?.type===`tool_use`&&a.resolvedToolUseIDs.has(t.id)});case`collapsed_read_search`:return!1;default:return!0}}var Ji,Q,$,Yi,Xi,Zi,Qi,$i,ea,ta=e((()=>{Re(),Ji=t(B(),1),Q=t(B(),1),rn(),Ue(),Qe(),p(),V(),c(),Et(),Se(),sn(),un(),F(),rt(),r(),Te(),hn(),se(),mt(),Cn(),yr(),o(),Fr(),v(),m(),Rr(),u(),Zr(),$=H(),jt(),Ui(),Yi=Ji.memo(function({agentDefinitions:e}){return(0,$.jsx)(b,{children:(0,$.jsxs)(R,{flexDirection:`column`,gap:1,children:[(0,$.jsx)(gr,{}),(0,$.jsx)(Ji.Suspense,{fallback:null,children:(0,$.jsx)(qr,{agentDefinitions:e})})]})})}),Xi=30,Zi=200,Qi=50,$i=({messages:e,tools:t,commands:r,verbose:i,toolJSX:a,toolUseConfirmQueue:o,inProgressToolUseIDs:s,isMessageSelectorVisible:c,conversationId:l,screen:u,streamingToolUses:d,showAllInTranscript:f=!1,agentDefinitions:p,hideLogo:m=!1,isLoading:h,hidePastThinking:g=!1,streamingThinking:v,streamingText:b,unseenDivider:S,scrollRef:T,trackStickyPrompt:E,jumpRef:te,onSearchMatchesChange:ne,scanElement:ie,setPositions:se,disableRenderCap:A=!1,cursor:j=null,setCursor:ce,cursorNavRef:de,renderRange:M})=>{let{columns:N}=Ve(),fe=w(`transcript:toggleShowAll`,`Transcript`,`Ctrl+E`),P=(0,Q.useMemo)(()=>pe(e).filter(x),[e]),me=(0,Q.useMemo)(()=>v?v.isStreaming?!0:v.streamingEndedAt?Date.now()-v.streamingEndedAt<3e4:!1:!1,[v]),{lastThinkingBlockId:ge,latestBashOutputUUID:_e}=(0,Q.useMemo)(()=>{let e=null,t=null,n=g&&!me;g&&me&&(e=`streaming`);for(let r=P.length-1;r>=0;r--){let i=P[r];if(i?.type===`user`){let r=i.message.content;if(!t){for(let e of r)if(e.type===`text`){let n=e.text??``;if(n.startsWith(`<bash-stdout`)||n.startsWith(`<bash-stderr`)){t=i.uuid;break}}}n&&!e&&(r.some(e=>e.type===`tool_result`)||(e=`no-thinking`))}else if(i?.type===`assistant`&&n&&!e){let t=i.message.content;for(let n=t.length-1;n>=0;n--)if(t[n]?.type===`thinking`){e=`${i.uuid}:${n}`;break}}if(e!==null&&t)break}return g||(e=null),{lastThinkingBlockId:e,latestBashOutputUUID:t}},[P,g,me]),ve=(0,Q.useMemo)(()=>ae(P),[P]),ye=(0,Q.useMemo)(()=>d.filter(e=>!s.has(e.contentBlock.id)&&!ve.has(e.contentBlock.id)),[d,s,ve]),be=(0,Q.useMemo)(()=>ye.flatMap(e=>{let t=C({content:[e.contentBlock]});return t.uuid=Ce(e.contentBlock.id,0),pe([t])}),[ye]),xe=u===`transcript`,Se=(0,Q.useMemo)(()=>n(process.env.CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL),[]),we=T!=null&&!Se,Te=xe&&!f&&!we,De=(0,Q.useRef)(null),F=(0,Q.useRef)(null),{collapsed:Oe,lookups:ke,hasTruncatedMessages:je,hiddenMessageCount:Me}=(0,Q.useMemo)(()=>{let e=O((i||Ae()?P:Ee(P,{includeSnipped:!0})).filter(e=>e.type!==`progress`&&!Ir(e)&&re(e,xe)),be),n=Te?e.slice(-30):e,r=Te&&e.length>Xi,{messages:a}=pn(n,t,i),o=on(ln(k(a,t)),i),s=D(P,n),c=(()=>{let e=n.at(-1);return e?.type===`assistant`?e.message?.id:void 0})(),l;if(F.current&&F.current.key===s)l=F.current.lookups;else if(F.current&&P.length>=F.current.normalizedCount&&n.length>=F.current.messageCount&&F.current.lastAssistantMsgId===c){let e=oe(F.current.lookups,F.current.normalizedCount,F.current.messageCount,P,n);e?(l=e,F.current={key:s,lookups:l,normalizedCount:P.length,messageCount:n.length,lastAssistantMsgId:c}):(l=le(P,n),F.current={key:s,lookups:l,normalizedCount:P.length,messageCount:n.length,lastAssistantMsgId:c})}else l=le(P,n),F.current={key:s,lookups:l,normalizedCount:P.length,messageCount:n.length,lastAssistantMsgId:c};let u=e.length-Xi;return{collapsed:o,lookups:l,hasTruncatedMessages:r,hiddenMessageCount:u}},[i,P,xe,be,Te,t]),I=(0,Q.useMemo)(()=>{let e=!we&&!A?Wi(Oe,De):0;return M?Oe.slice(M[0],M[1]):e>0?Oe.slice(e):Oe},[Oe,M,we,A]),L=(0,Q.useMemo)(()=>new Set(d.map(e=>e.contentBlock.id)),[d]),{dividerBeforeIndex:Pe,selectedIdx:Ie}=(0,Q.useMemo)(()=>{if(!S&&!j)return{dividerBeforeIndex:-1,selectedIdx:-1};let e=-1,t=-1,n=S?.firstUnseenUuid.slice(0,24);for(let r=0;r<I.length;r++){let i=I[r];if(e===-1&&n&&i.uuid.slice(0,24)===n&&(e=r),t===-1&&j&&i.uuid===j.uuid&&(t=r),e!==-1&&t!==-1)break}return{dividerBeforeIndex:e,selectedIdx:t}},[S,j,I]),[B,Re]=(0,Q.useState)(()=>new Set),ze=(0,Q.useCallback)(e=>{let t=Gi(e);Re(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})},[]),Be=(0,Q.useCallback)(e=>B.size>0&&B.has(Gi(e)),[B]),V=(0,Q.useRef)(ke);V.current=ke;let He=(0,Q.useCallback)(e=>{if(e.type===`collapsed_read_search`)return!0;if(e.type===`assistant`){let t=e.message.content,n=Array.isArray(t)?t[0]:void 0;return n!=null&&he(n)&&n.type===`advisor_tool_result`&&n.content.type===`advisor_result`}if(e.type!==`user`)return!1;let n=e.message.content[0];if(n?.type!==`tool_result`||n.is_error||!e.toolUseResult)return!1;let r=V.current.toolUseByToolUseID.get(n.tool_use_id??``)?.name;return(r?Tt(t,r):void 0)?.isResultTruncated?.(e.toolUseResult)??!1},[t]),H=(!a||!!a.shouldContinueAnimation)&&!o.length&&!c,Ue=s.size>0,{progress:Ge}=Fe(),Ke=(0,Q.useRef)(null),qe=nt().terminalProgressBarEnabled&&!We()&&!Mt();(0,Q.useEffect)(()=>{let e=qe?Ue?`indeterminate`:`completed`:null;Ke.current!==e&&(Ke.current=e,Ge(e))},[Ge,qe,Ue]),(0,Q.useEffect)(()=>()=>Ge(null),[Ge]);let Je=(0,Q.useCallback)(e=>`${e.uuid}-${l}`,[l]),Ye=(e,n)=>{let a=n>0?I[n-1]?.type:void 0,o=e.type===`user`&&a===`user`,c=e.type===`collapsed_read_search`&&(!!b||Er(I,n,t,L)),l=I.length-1-n>0,d=Je(e),f=(0,$.jsx)(Pr,{message:e,isUserContinuation:o,hasContentAfter:c,tools:t,commands:r,verbose:i||Be(e)||j?.expanded===!0&&n===Ie,inProgressToolUseIDs:s,streamingToolUseIDs:L,screen:u,canAnimate:H,lastThinkingBlockId:ge,latestBashOutputUUID:_e,columns:N,isLoading:h,lookups:ke,shouldCollapseDiffs:l},d),p=(0,$.jsx)(_.Provider,{value:n===Ie,children:f},d);return S&&n===Pe?[(0,$.jsx)(R,{marginTop:1,children:(0,$.jsx)(Ne,{title:`${S.count} new ${pt(S.count,`message`)}`,width:N,color:`inactive`})},`unseen-divider`),p]:p},Xe=(0,Q.useRef)(new WeakMap),Ze=(0,Q.useCallback)(e=>{let n=Xe.current.get(e);if(n!==void 0)return n;let r=gn(e);if(e.type===`user`&&e.toolUseResult&&Array.isArray(e.message.content)){let n=e.message.content.find(e=>e.type===`tool_result`);if(n&&`tool_use_id`in n){let i=ke.toolUseByToolUseID.get(n.tool_use_id),a=(i&&Tt(t,i.name))?.extractSearchText?.(e.toolUseResult);a!==void 0&&(r=a)}}let i=r.toLowerCase();return Xe.current.set(e,i),i},[t,ke]);return(0,$.jsxs)($.Fragment,{children:[!m&&!(M&&M[0]>0)&&(0,$.jsx)(Yi,{agentDefinitions:p}),je&&(0,$.jsx)(Ne,{title:`${fe} to show ${Le.bold(Me)} previous messages`,width:N}),xe&&f&&Me>0&&!A&&(0,$.jsx)(Ne,{title:`${fe} to hide ${Le.bold(Me)} previous messages`,width:N}),we?(0,$.jsx)(ue.Provider,{value:!0,children:(0,$.jsx)(Fi,{messages:I,scrollRef:T,columns:N,itemKey:Je,renderItem:Ye,onItemClick:ze,isItemClickable:He,isItemExpanded:Be,trackStickyPrompt:E,selectedIndex:Ie>=0?Ie:void 0,cursorNavRef:de,setCursor:ce,jumpRef:te,onSearchMatchesChange:ne,scanElement:ie,setPositions:se,extractSearchText:Ze})}):I.flatMap(Ye),b&&(0,$.jsx)(R,{alignItems:`flex-start`,flexDirection:`row`,marginTop:1,width:`100%`,children:(0,$.jsxs)(R,{flexDirection:`row`,children:[(0,$.jsx)(R,{minWidth:2,children:(0,$.jsx)(z,{color:`text`,children:$e})}),(0,$.jsx)(R,{flexDirection:`column`,children:(0,$.jsx)(y,{children:b})})]})}),me&&v&&(0,$.jsx)(R,{marginTop:1,children:(0,$.jsx)(ee,{param:{type:`thinking`,thinking:v.thinking},addMargin:!1,isTranscriptMode:!0,verbose:i,hideInTranscript:!1})})]})},ea=Ji.memo($i,(e,t)=>{let n=Object.keys(e);for(let r of n)if(!(r===`scrollRef`||r===`trackStickyPrompt`||r===`setCursor`||r===`cursorNavRef`||r===`jumpRef`||r===`onSearchMatchesChange`||r===`scanElement`||r===`setPositions`)&&e[r]!==t[r]){if(r===`streamingToolUses`){let n=e.streamingToolUses,r=t.streamingToolUses;if(n.length===r.length&&n.every((e,t)=>e.contentBlock===r[t]?.contentBlock))continue}if(r===`inProgressToolUseIDs`&&Ki(e.inProgressToolUseIDs,t.inProgressToolUseIDs))continue;if(r===`unseenDivider`){let n=e.unseenDivider,r=t.unseenDivider;if(n?.firstUnseenUuid===r?.firstUnseenUuid&&n?.count===r?.count)continue}if(r===`tools`){let n=e.tools,r=t.tools;if(n.length===r.length&&n.every((e,t)=>e.name===r[t]?.name))continue}return!1}return!0})}));export{Ai as a,di as c,Si as i,fi as l,ta as n,yi as o,Ci as r,vi as s,ea as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{d as t,o as n}from"./envUtils-DcaKZlRU.js";import{Du as r,Fu as i,Iu as a,Ou as o,lu as s,zS as c}from"./loadAgentsDir-C96o6gCj.js";import{Gt as l,H as u,I as d,Lt as f,P as p,ai as m,kt as h,t as g}from"./src-DL3w8VPk.js";import{t as _}from"./jsx-runtime-Bb4Xn-E0.js";import{Gt as v,Jt as y}from"./settings-BowI3jp-.js";import{h as b,s as x}from"./config-DUTgj3js.js";import{n as S,r as C}from"./analytics-DJobLaWP.js";import{It as w,Pt as T,hr as E,mr as D}from"./model-BaMclMXn.js";import{c as O,i as k,s as A}from"./terminalSetup-a7-BNS4T.js";import{n as j,t as M}from"./useExitOnCtrlCDWithKeybindings-L5idX6Kz.js";import{n as N,t as P}from"./ThemePicker-CIFKZza0.js";import{n as F,t as I}from"./PressEnterToContinue-DZc_s_pE.js";import{t as L}from"./ApproveApiKey-Bolw0sPs.js";n();var R=e(m(),1),z=_();S(),y(),b(),D(),T(),c(),k(),M(),g(),g(),s(),a(),o(),g();var B=58;function V(){let[e]=u(),t=`Welcome to Work Mate`;return v.terminal===`Apple_Terminal`?(0,z.jsx)(H,{theme:e,welcomeMessage:t}):[`light`,`light-daltonized`,`light-ansi`].includes(e)?(0,z.jsxs)(d,{width:B,flexDirection:`column`,children:[(0,z.jsxs)(p,{children:[(0,z.jsxs)(p,{color:`claudeBlue_FOR_SYSTEM_SPINNER`,children:[t,` `]}),(0,z.jsxs)(p,{dimColor:!0,children:[`v`,`0.0.21`,` `]})]}),(0,z.jsx)(p,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,z.jsx)(p,{children:` ░░░░░░ `}),(0,z.jsx)(p,{children:` ░░░ ░░░░░░░░░░ `}),(0,z.jsx)(p,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,z.jsx)(p,{children:` `})]}):(0,z.jsxs)(d,{width:B,flexDirection:`column`,children:[(0,z.jsxs)(p,{children:[(0,z.jsxs)(p,{color:`claudeBlue_FOR_SYSTEM_SPINNER`,children:[t,` `]}),(0,z.jsxs)(p,{dimColor:!0,children:[`v`,`0.0.21`,` `]})]}),(0,z.jsx)(p,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,z.jsx)(p,{children:` * █████▓▓░ `}),(0,z.jsx)(p,{children:` * ███▓░ ░░ `}),(0,z.jsx)(p,{children:` ░░░░░░ ███▓░ `}),(0,z.jsx)(p,{children:` ░░░ ░░░░░░░░░░ ███▓░ `}),(0,z.jsxs)(p,{children:[(0,z.jsx)(p,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,z.jsx)(p,{bold:!0,children:`*`}),(0,z.jsx)(p,{children:` ██▓░░ ▓ `})]}),(0,z.jsx)(p,{children:` ░▓▓███▓▓░ `}),(0,z.jsx)(p,{dimColor:!0,children:` * ░░░░ `}),(0,z.jsx)(p,{dimColor:!0,children:` ░░░░░░░░ `}),(0,z.jsx)(p,{dimColor:!0,children:` * ░░░░░░░░░░░░░░░░ `}),(0,z.jsx)(p,{dimColor:!0,children:` * `})]})}function H({theme:e,welcomeMessage:t}){return[`light`,`light-daltonized`,`light-ansi`].includes(e)?(0,z.jsxs)(d,{width:B,flexDirection:`column`,children:[(0,z.jsxs)(p,{children:[(0,z.jsxs)(p,{color:`claudeBlue_FOR_SYSTEM_SPINNER`,children:[t,` `]}),(0,z.jsxs)(p,{dimColor:!0,children:[`v`,`0.0.21`,` `]})]}),(0,z.jsx)(p,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,z.jsx)(p,{children:` ░░░░░░ `}),(0,z.jsx)(p,{children:` ░░░ ░░░░░░░░░░ `}),(0,z.jsx)(p,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,z.jsx)(p,{children:` `})]}):(0,z.jsxs)(d,{width:B,flexDirection:`column`,children:[(0,z.jsxs)(p,{children:[(0,z.jsxs)(p,{color:`claudeBlue_FOR_SYSTEM_SPINNER`,children:[t,` `]}),(0,z.jsxs)(p,{dimColor:!0,children:[`v`,`0.0.21`,` `]})]}),(0,z.jsx)(p,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,z.jsx)(p,{children:` * █████▓▓░ `}),(0,z.jsx)(p,{children:` * ███▓░ ░░ `}),(0,z.jsx)(p,{children:` ░░░░░░ ███▓░ `}),(0,z.jsx)(p,{children:` ░░░ ░░░░░░░░░░ ███▓░ `}),(0,z.jsxs)(p,{children:[(0,z.jsx)(p,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,z.jsx)(p,{bold:!0,children:`*`}),(0,z.jsx)(p,{children:` ██▓░░ ▓ `})]}),(0,z.jsx)(p,{children:` ░▓▓███▓▓░ `}),(0,z.jsx)(p,{dimColor:!0,children:` * ░░░░ `}),(0,z.jsx)(p,{dimColor:!0,children:` ░░░░░░░░ `}),(0,z.jsx)(p,{dimColor:!0,children:` ░░░░░░░░░░░░░░░░ `})]})}N(),F(),g();var U=(0,R.createContext)({marker:``});function W({children:e}){let{marker:t}=(0,R.useContext)(U);return(0,z.jsxs)(d,{gap:1,children:[(0,z.jsx)(p,{dimColor:!0,children:t}),(0,z.jsx)(d,{flexDirection:`column`,children:e})]})}g();var G=(0,R.createContext)({marker:``});function K({children:e}){let{marker:t}=(0,R.useContext)(G),n=0;for(let t of R.Children.toArray(e))!(0,R.isValidElement)(t)||t.type!==W||n++;let r=String(n).length;return(0,z.jsx)(d,{flexDirection:`column`,children:R.Children.map(e,(e,n)=>{if(!(0,R.isValidElement)(e)||e.type!==W)return e;let i=`${String(n+1).padStart(r)}.`,a=`${t}${i}`;return(0,z.jsx)(G.Provider,{value:{marker:a},children:(0,z.jsx)(U.Provider,{value:{marker:a},children:e})})})})}K.Item=W;var q=K;g(),y();function J({onDone:e}){let[n,a]=(0,R.useState)(0),[o,s]=(0,R.useState)(!1),[c]=(0,R.useState)(()=>w()),[m,g]=u();(0,R.useEffect)(()=>{C(`tengu_began_setup`,{oauthEnabled:c})},[c]);function _(){if(n<M.length-1){let e=n+1;a(e),C(`tengu_onboarding_step`,{oauthEnabled:c,stepId:M[e]?.id})}else e()}function y(e){g(e),_()}let b=j(),S=(0,z.jsx)(d,{marginX:1,children:(0,z.jsx)(P,{onThemeSelect:y,showIntroText:!0,helpText:`To change this later, run /theme`,hideEscToCancel:!0,skipExitHandling:!0})}),T=(0,z.jsxs)(d,{flexDirection:`column`,gap:1,paddingLeft:1,children:[(0,z.jsx)(p,{bold:!0,children:`Before you start, keep in mind:`}),(0,z.jsx)(d,{flexDirection:`column`,width:70,children:(0,z.jsxs)(q,{children:[(0,z.jsxs)(q.Item,{children:[(0,z.jsx)(p,{children:`Always review changes before accepting`}),(0,z.jsxs)(p,{dimColor:!0,wrap:`wrap`,children:[`Work Mate can make mistakes — especially when running commands`,(0,z.jsx)(h,{}),`or editing files. You stay in control of every action.`,(0,z.jsx)(h,{})]})]}),(0,z.jsxs)(q.Item,{children:[(0,z.jsx)(p,{children:`Only use Work Mate on projects you trust`}),(0,z.jsxs)(p,{dimColor:!0,wrap:`wrap`,children:[`Untrusted code could contain prompt injection attacks.`,(0,z.jsx)(h,{}),(0,z.jsx)(f,{url:`https://code.workmate.com/docs/en/security`})]})]})]})}),(0,z.jsx)(I,{})]}),D=(0,R.useMemo)(()=>{if(!process.env.ANTHROPIC_API_KEY||t())return``;let e=E(process.env.ANTHROPIC_API_KEY);if(x(e)===`new`)return e},[]);function k(e){e&&s(!0),_()}let M=[];M.push({id:`theme`,component:S}),D&&M.push({id:`api-key`,component:(0,z.jsx)(L,{customApiKeyTruncated:D,onDone:k})}),c&&M.push({id:`oauth`,component:(0,z.jsx)(Y,{skip:o,onSkip:_,children:(0,z.jsx)(i,{onDone:_})})}),M.push({id:`security`,component:T}),O()&&M.push({id:`terminal-setup`,component:(0,z.jsxs)(d,{flexDirection:`column`,gap:1,paddingLeft:1,children:[(0,z.jsx)(p,{bold:!0,children:`Use Work Mate's terminal setup?`}),(0,z.jsxs)(d,{flexDirection:`column`,width:70,gap:1,children:[(0,z.jsxs)(p,{children:[`For the optimal coding experience, enable the recommended settings`,(0,z.jsx)(h,{}),`for your terminal:`,` `,v.terminal===`Apple_Terminal`?`Option+Enter for newlines and visual bell`:`Shift+Enter for newlines`]}),(0,z.jsx)(r,{options:[{label:`Yes, use recommended settings`,value:`install`},{label:`No, maybe later with /terminal-setup`,value:`no`}],onChange:e=>{e===`install`?A(m).catch(()=>{}).finally(_):_()},onCancel:()=>_()}),(0,z.jsx)(p,{dimColor:!0,children:b.pending?(0,z.jsxs)(z.Fragment,{children:[`Press `,b.keyName,` again to exit`]}):(0,z.jsx)(z.Fragment,{children:`Enter to confirm · Esc to skip`})})]})]})});let N=M[n],F=(0,R.useCallback)(()=>{n===M.length-1?e():_()},[n,M.length,c,e]),B=(0,R.useCallback)(()=>{_()},[n,M.length,c,e]);return l({"confirm:yes":F},{context:`Confirmation`,isActive:N?.id===`security`}),l({"confirm:no":B},{context:`Confirmation`,isActive:N?.id===`terminal-setup`}),(0,z.jsxs)(d,{flexDirection:`column`,children:[(0,z.jsx)(V,{}),(0,z.jsxs)(d,{flexDirection:`column`,marginTop:1,children:[N?.component,b.pending&&(0,z.jsx)(d,{padding:1,children:(0,z.jsxs)(p,{dimColor:!0,children:[`Press `,b.keyName,` again to exit`]})})]})]})}function Y({skip:e,onSkip:t,children:n}){return(0,R.useEffect)(()=>{e&&t()},[e,t]),e?null:n}export{J as Onboarding};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{BS as t,RT as n,VS as r,zT as i}from"./loadAgentsDir-C96o6gCj.js";import{I as a,P as o,t as s}from"./src-DL3w8VPk.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{Gt as l,Jt as u}from"./settings-BowI3jp-.js";import{c as d,h as f}from"./config-DUTgj3js.js";import{i as p,o as m}from"./platform-DMQxcm4K.js";import{J as h,Y as g,Z as _}from"./model-BaMclMXn.js";import{a as v,i as y,r as b}from"./terminalSetup-a7-BNS4T.js";function x(){return d().editorMode===`vim`}function S(){return l.terminal===`Apple_Terminal`&&process.platform===`darwin`||v()?`shift + ⏎ for newline`:b()?`\\⏎ for newline`:`backslash (\\) + return (⏎) for newline`}function C(e,t){return t.ctrl||t.meta||t.escape||t.return||t.tab||t.backspace||t.delete||t.upArrow||t.downArrow||t.leftArrow||t.rightArrow||t.pageUp||t.pageDown||t.home||t.end?!1:e.length>0&&!/^\s/.test(e)&&!e.startsWith(`\x1B`)}var w=e((()=>{y(),f(),u()}));function T(e){return e.replace(/\+/g,` + `)}function E(e){let{dimColor:t,fixedWidth:n,gap:s,paddingX:c}=e,l=T(r(`app:toggleTranscript`,`Global`,`ctrl+o`)),u=T(r(`app:toggleTodos`,`Global`,`ctrl+t`)),d=T(r(`chat:undo`,`Chat`,`ctrl+_`)),f=T(r(`chat:stash`,`Chat`,`ctrl+s`)),m=T(r(`chat:cycleMode`,`Chat`,`shift+tab`)),h=T(r(`chat:modelPicker`,`Chat`,`alt+p`)),v=T(r(`chat:fastMode`,`Chat`,`alt+o`)),y=T(r(`chat:externalEditor`,`Chat`,`ctrl+g`));T(r(`app:toggleTerminal`,`Global`,`meta+j`));let b=T(r(`chat:imagePaste`,`Chat`,`ctrl+v`));return(0,D.jsxs)(a,{paddingX:c,flexDirection:`row`,gap:s,children:[(0,D.jsxs)(a,{flexDirection:`column`,width:n?24:void 0,children:[(0,D.jsx)(a,{children:(0,D.jsx)(o,{dimColor:t,children:`! for bash mode`})}),(0,D.jsx)(a,{children:(0,D.jsx)(o,{dimColor:t,children:`/ for commands`})}),(0,D.jsx)(a,{children:(0,D.jsx)(o,{dimColor:t,children:`@ for file paths`})}),(0,D.jsx)(a,{children:(0,D.jsx)(o,{dimColor:t,children:`& for background`})}),(0,D.jsx)(a,{children:(0,D.jsx)(o,{dimColor:t,children:`/btw for side question`})})]}),(0,D.jsxs)(a,{flexDirection:`column`,width:n?35:void 0,children:[(0,D.jsx)(a,{children:(0,D.jsx)(o,{dimColor:t,children:`double tap esc to clear input`})}),(0,D.jsx)(a,{children:(0,D.jsxs)(o,{dimColor:t,children:[m,` to auto-accept edits`]})}),(0,D.jsx)(a,{children:(0,D.jsxs)(o,{dimColor:t,children:[l,` for verbose output`]})}),(0,D.jsx)(a,{children:(0,D.jsxs)(o,{dimColor:t,children:[u,` to toggle tasks`]})}),(0,D.jsx)(a,{children:(0,D.jsx)(o,{dimColor:t,children:S()})})]}),(0,D.jsxs)(a,{flexDirection:`column`,children:[(0,D.jsx)(a,{children:(0,D.jsxs)(o,{dimColor:t,children:[d,` to undo`]})}),p()!==`windows`&&(0,D.jsx)(a,{children:(0,D.jsx)(o,{dimColor:t,children:`ctrl + z to suspend`})}),(0,D.jsx)(a,{children:(0,D.jsxs)(o,{dimColor:t,children:[b,` to paste images`]})}),(0,D.jsx)(a,{children:(0,D.jsxs)(o,{dimColor:t,children:[h,` to switch model`]})}),_()&&g()&&(0,D.jsx)(a,{children:(0,D.jsxs)(o,{dimColor:t,children:[v,` to toggle fast mode`]})}),(0,D.jsx)(a,{children:(0,D.jsxs)(o,{dimColor:t,children:[f,` to stash prompt`]})}),(0,D.jsx)(a,{children:(0,D.jsxs)(o,{dimColor:t,children:[y,` to edit in $EDITOR`]})}),i()&&(0,D.jsx)(a,{children:(0,D.jsx)(o,{dimColor:t,children:`/keybindings to customize`})})]})]})}var D,O=e((()=>{s(),m(),n(),t(),h(),w(),D=c()}));export{x as a,C as i,O as n,w as r,E as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,o as n,s as r}from"./envUtils-DcaKZlRU.js";import{n as i,t as a}from"./defineProperty-C-QyHrDq.js";import{$ as o,$n as s,C_ as c,Cs as l,DT as u,ET as d,Ey as f,Fi as ee,Hs as te,If as p,Kh as ne,Kw as m,La as h,Li as g,Oy as re,S_ as _,Ss as v,Uh as ie,Vp as y,Vs as b,X as ae,Xr as x,Y as oe,Yh as S,Yv as C,_a as w,_n as T,aC as se,at as E,br as ce,cv as D,cy as le,ea as O,fE as k,iC as A,ja as ue,lb as j,ot as M,pE as de,sv as fe,ub as N,vn as pe,w_ as P,ws as F,xs as me,za as he,zf as ge,zp as I}from"./loadAgentsDir-C96o6gCj.js";import{Kr as _e,qr as ve}from"./src-DL3w8VPk.js";import{Tt as L,Ut as R,Wt as ye,Z as z,ft as B,ut as be,xt as V}from"./state-D5D6QpTX.js";import{n as xe,t as Se}from"./cwd-Nh5IZNKO.js";import{J as H,Z as Ce,d as we,h as U}from"./settings-BowI3jp-.js";import{M as W,c as Te,h as Ee,j as De}from"./config-DUTgj3js.js";import{i as Oe,o as ke,q as Ae}from"./log-CZ7ploQm.js";import{C as je,J as G,Pt as K,U as q,_ as Me,gt as Ne,u as Pe}from"./model-BaMclMXn.js";import{at as Fe,bn as Ie,nt as Le,vn as J}from"./prompt-BNNE5tsG.js";import{Q as Re,T as ze,et as Be}from"./sessionState-8jutEorw.js";import{a as Ve,n as He,r as Ue}from"./mappers-D8VLUZ2N.js";import{n as Y,o as We,r as X}from"./MessageSelector-BvRVrfg6.js";import{n as Ge,t as Ke}from"./systemTheme-Ceakddth.js";import{randomUUID as Z}from"crypto";n(),i(),_e(),R(),xe(),Ae(),ke(),U(),W(),J(),Ee(),k(),K(),G(),d(),ze(),re(),le(),Fe(),D(),S(),y(),b(),h(),O(),g(),ce(),T(),ae(),M(),P(),N(),Me(),C(),p();async function qe({tools:e,mainLoopModel:t,additionalWorkingDirectories:n,mcpClients:r,customSystemPrompt:i}){let[a,o,s]=await Promise.all([i===void 0?E(e,t,n,r):Promise.resolve([]),c(),i===void 0?_():Promise.resolve({})]);return{defaultSystemPrompt:a,userContext:o,systemContext:s}}async function Je({tools:e,commands:t,mcpClients:n,messages:r,readFileState:i,getAppState:a,setAppState:o,customSystemPrompt:s,appendSystemPrompt:c,thinkingConfig:l,agents:u}){let d=Pe(),f=a(),{defaultSystemPrompt:ee,userContext:te,systemContext:p}=await qe({tools:e,mainLoopModel:d,additionalWorkingDirectories:Array.from(f.toolPermissionContext.additionalWorkingDirectories.keys()),mcpClients:n,customSystemPrompt:s}),ne=Re([...s===void 0?ee:[s],...c?[c]:[]]),m=r.at(-1),h=m?.type===`assistant`&&m.message.stop_reason===null?r.slice(0,-1):r;return{systemPrompt:ne,userContext:te,systemContext:p,toolUseContext:{options:{commands:t,debug:!1,mainLoopModel:d,tools:e,verbose:!1,thinkingConfig:l??(ge()===!1?{type:`disabled`}:{type:`adaptive`}),mcpClients:n,mcpResources:{},isNonInteractiveSession:!0,agentDefinitions:{activeAgents:u,allAgents:[]},customSystemPrompt:s,appendSystemPrompt:c},abortController:j(),readFileState:i,getAppState:a,setAppState:o,messages:h,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:()=>{},updateAttributionState:()=>{}},forkContextMessages:h}}A(),He(),Ke(),ue(),Ce();function Ye(e){return e===`Agent`?H:e}function Xe(e){let t=we()?.outputStyle??`default`,n={type:`system`,subtype:`init`,cwd:Se(),session_id:B(),tools:e.tools.map(e=>Ye(e.name)),mcp_servers:e.mcpClients.map(e=>({name:e.name,status:e.type})),model:e.model,permissionMode:e.permissionMode,slash_commands:e.commands.filter(e=>e.userInvocable!==!1).map(e=>e.name),apiKeySource:Ne().source,betas:be(),claude_code_version:`0.0.21`,output_style:t,agents:e.agents.map(e=>e.agentType),skills:e.skills.filter(e=>e.userInvocable!==!1).map(e=>e.name),plugins:e.plugins.map(e=>({name:e.name,path:e.path,source:e.source})),uuid:Z()};return n.fast_mode_state=q(e.model,e.fastMode),n}R(),N(),xe(),G(),Me(),C(),p(),v();var Ze=()=>{try{return X(),e(Y)}catch{return null}},Q=class{constructor(e){a(this,`config`,void 0),a(this,`mutableMessages`,void 0),a(this,`abortController`,void 0),a(this,`permissionDenials`,void 0),a(this,`totalUsage`,void 0),a(this,`hasHandledOrphanedPermission`,!1),a(this,`readFileState`,void 0),a(this,`discoveredSkillNames`,new Set),a(this,`loadedNestedMemoryPaths`,new Set),this.config=e,this.mutableMessages=e.initialMessages??[],this.abortController=e.abortController??j(),this.permissionDenials=[],this.readFileState=e.readFileCache,this.totalUsage=Be}async*submitMessage(e,n){let{cwd:i,commands:a,tools:c,mcpClients:d,verbose:f=!1,thinkingConfig:p,maxTurns:h,maxBudgetUsd:g,taskBudget:re,canUseTool:_,customSystemPrompt:v,appendSystemPrompt:y,userSpecifiedModel:b,fallbackModel:ae,jsonSchema:S,getAppState:C,setAppState:T,replayUserMessages:E=!1,includePartialMessages:ce=!1,agents:D=[],setSDKStatus:le,orphanedPermission:O}=this.config;this.discoveredSkillNames.clear(),this.permissionDenials=[],se(i);let k=!ye(),A=Date.now(),ue=async(e,t,n,r,i,a)=>{let o=await _(e,t,n,r,i,a);return o.behavior!==`allow`&&this.permissionDenials.push({type:`permission_denial`,tool_name:Ye(e.name),tool_use_id:i,tool_input:t}),o},j=C(),M=b?je(b):Pe(),N=p||(ge()===!1?{type:`disabled`}:{type:`adaptive`});I(`before_getSystemPrompt`);let P=typeof v==`string`?v:void 0,{defaultSystemPrompt:_e,userContext:R,systemContext:be}=await qe({tools:c,mainLoopModel:M,additionalWorkingDirectories:Array.from(j.toolPermissionContext.additionalWorkingDirectories.keys()),mcpClients:d,customSystemPrompt:P});I(`after_getSystemPrompt`);let xe={...R},H=P!==void 0&&De()?await de():null,Ce=Re([...P===void 0?_e:[P],...H?[H]:[],...y?[y]:[]]),we=c.some(e=>Ie(e,Le));S&&we&&pe(T,B());let U={messages:this.mutableMessages,setMessages:e=>{this.mutableMessages=e(this.mutableMessages)},onChangeAPIKey:()=>{},handleElicitation:this.config.handleElicitation,options:{commands:a,debug:!1,tools:c,verbose:f,mainLoopModel:M,thinkingConfig:N,mcpClients:d,mcpResources:{},ideInstallationStatus:null,isNonInteractiveSession:!0,customSystemPrompt:v,appendSystemPrompt:y,agentDefinitions:{activeAgents:D,allAgents:[]},theme:Ge(Te().theme),maxBudgetUsd:g},getAppState:C,setAppState:T,abortController:this.abortController,readFileState:this.readFileState,nestedMemoryAttachmentTriggers:new Set,loadedNestedMemoryPaths:this.loadedNestedMemoryPaths,dynamicSkillDirTriggers:new Set,discoveredSkillNames:this.discoveredSkillNames,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:e=>{T(t=>{let n=e(t.fileHistory);return n===t.fileHistory?t:{...t,fileHistory:n}})},updateAttributionState:e=>{T(t=>{let n=e(t.attribution);return n===t.attribution?t:{...t,attribution:n}})},setSDKStatus:le};if(O&&!this.hasHandledOrphanedPermission){this.hasHandledOrphanedPermission=!0;for await(let e of me(O,c,this.mutableMessages,U))yield e}let{messages:W,shouldQuery:Ee,allowedTools:ke,model:Ae,resultText:G}=await We({input:e,mode:`prompt`,setToolJSX:()=>{},context:{...U,messages:this.mutableMessages},messages:this.mutableMessages,uuid:n?.uuid,isMeta:n?.isMeta,querySource:`sdk`});this.mutableMessages.push(...W);let K=[...this.mutableMessages];if(k&&W.length>0){let e=x(K);r()||(await e,(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await s())}let Me=Ze(),Ne=W.filter(e=>e.type===`user`&&!e.isMeta&&!e.toolUseResult&&(Me?.selectableUserMessagesFilter(e)??!0)||e.type===`system`&&e.subtype===`compact_boundary`),Fe=E?Ne:[];T(e=>({...e,toolPermissionContext:{...e.toolPermissionContext,alwaysAllowRules:{...e.toolPermissionContext.alwaysAllowRules,command:ke}}}));let J=Ae??M;U={messages:K,setMessages:()=>{},onChangeAPIKey:()=>{},handleElicitation:this.config.handleElicitation,options:{commands:a,debug:!1,tools:c,verbose:f,mainLoopModel:J,thinkingConfig:N,mcpClients:d,mcpResources:{},ideInstallationStatus:null,isNonInteractiveSession:!0,customSystemPrompt:v,appendSystemPrompt:y,theme:Ge(Te().theme),agentDefinitions:{activeAgents:D,allAgents:[]},maxBudgetUsd:g},getAppState:C,setAppState:T,abortController:this.abortController,readFileState:this.readFileState,nestedMemoryAttachmentTriggers:new Set,loadedNestedMemoryPaths:this.loadedNestedMemoryPaths,dynamicSkillDirTriggers:new Set,discoveredSkillNames:this.discoveredSkillNames,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:U.updateFileHistoryState,updateAttributionState:U.updateAttributionState,setSDKStatus:le},I(`before_skills_plugins`);let[ze,{enabled:He}]=await Promise.all([ee(Se()),he()]);if(I(`after_skills_plugins`),yield Xe({tools:c,mcpClients:d,model:J,permissionMode:j.toolPermissionContext.mode,commands:a,agents:D,skills:ze,plugins:He,fastMode:j.fastMode}),I(`system_message_yielded`),!Ee){for(let e of W)if(e.type===`user`&&typeof e.message.content==`string`&&(e.message.content.includes(`<local-command-stdout>`)||e.message.content.includes(`<local-command-stderr>`)||e.isCompactSummary)&&(yield{type:`user`,message:{...e.message,content:ve(e.message.content)},session_id:B(),parent_tool_use_id:null,uuid:e.uuid,timestamp:e.timestamp,isReplay:!e.isCompactSummary,isSynthetic:e.isMeta||e.isVisibleInTranscriptOnly}),e.type===`system`&&e.subtype===`local_command`&&typeof e.content==`string`&&(e.content.includes(`<local-command-stdout>`)||e.content.includes(`<local-command-stderr>`))&&(yield Ue(e.content,e.uuid)),e.type===`system`&&e.subtype===`compact_boundary`){let t=e;yield{type:`system`,subtype:`compact_boundary`,session_id:B(),uuid:e.uuid,compact_metadata:Ve(t.compactMetadata)}}k&&(await x(K),(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await s()),yield{type:`result`,subtype:`success`,is_error:!1,duration_ms:Date.now()-A,duration_api_ms:V(),num_turns:K.length-1,result:G??``,stop_reason:null,session_id:B(),total_cost_usd:L(),usage:this.totalUsage,modelUsage:z(),permission_denials:this.permissionDenials,fast_mode_state:q(J,j.fastMode),uuid:Z()};return}if(ie()&&k){let e=Ze()?.selectableUserMessagesFilter??(e=>!0);W.filter(e).forEach(e=>{ne(e=>{T(t=>({...t,fileHistory:e(t.fileHistory)}))},e.uuid)})}let Y=Be,X=1,Ke=!1,Je,Q=null,Qe=Oe().at(-1),$e=S?w(this.mutableMessages,Le):0;for await(let e of te({messages:K,systemPrompt:Ce,userContext:xe,systemContext:be,canUseTool:ue,toolUseContext:U,fallbackModel:ae,querySource:`sdk`,maxTurns:h,taskBudget:re})){if(e.type===`assistant`||e.type===`user`||e.type===`system`&&e.subtype===`compact_boundary`){if(k&&e.type===`system`&&e.subtype===`compact_boundary`){let t=e.compactMetadata?.preservedSegment?.tailUuid;if(t){let e=this.mutableMessages.findLastIndex(e=>e.uuid===t);e!==-1&&await x(this.mutableMessages.slice(0,e+1))}}if(K.push(e),k&&(e.type===`assistant`?x(K):await x(K)),!Ke&&Fe.length>0){Ke=!0;for(let e of Fe)e.type===`user`&&(yield{type:`user`,message:e.message,session_id:B(),parent_tool_use_id:null,uuid:e.uuid,timestamp:e.timestamp,isReplay:!0})}}switch(e.type===`user`&&X++,e.type){case`tombstone`:break;case`assistant`:{let t=e,n=t.message?.stop_reason;n!=null&&(Q=n),this.mutableMessages.push(t),yield*F(t);break}case`progress`:{let t=e;this.mutableMessages.push(t),k&&(K.push(t),x(K)),yield*F(t);break}case`user`:{let t=e;this.mutableMessages.push(t),yield*F(t);break}case`stream_event`:{let t=e.event;if(t.type===`message_start`){Y=Be;let e=t.message;Y=o(Y,e.usage)}if(t.type===`message_delta`){Y=o(Y,t.usage);let e=t.delta;e.stop_reason!=null&&(Q=e.stop_reason)}t.type===`message_stop`&&(this.totalUsage=oe(this.totalUsage,Y)),ce&&(yield{type:`stream_event`,event:t,session_id:B(),parent_tool_use_id:null,uuid:Z()});break}case`attachment`:{let n=e;this.mutableMessages.push(n),k&&(K.push(n),x(K));let r=n.attachment;if(r.type===`structured_output`)Je=r.data;else if(r.type===`max_turns_reached`){k&&(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await s(),yield{type:`result`,subtype:`error_max_turns`,duration_ms:Date.now()-A,duration_api_ms:V(),is_error:!0,num_turns:r.turnCount,stop_reason:Q,session_id:B(),total_cost_usd:L(),usage:this.totalUsage,modelUsage:z(),permission_denials:this.permissionDenials,fast_mode_state:q(J,j.fastMode),uuid:Z(),errors:[`Reached maximum number of turns (${r.maxTurns})`]};return}else E&&r.type===`queued_command`&&(yield{type:`user`,message:{role:`user`,content:r.prompt},session_id:B(),parent_tool_use_id:null,uuid:r.source_uuid||n.uuid,timestamp:n.timestamp,isReplay:!0});break}case`stream_request_start`:break;case`system`:{let t=e,n=this.config.snipReplay?.(t,this.mutableMessages);if(n!==void 0){n.executed&&(this.mutableMessages.length=0,this.mutableMessages.push(...n.messages));break}if(this.mutableMessages.push(t),t.subtype===`compact_boundary`&&t.compactMetadata){let e=t,n=this.mutableMessages.length-1;n>0&&this.mutableMessages.splice(0,n);let r=K.length-1;r>0&&K.splice(0,r),yield{type:`system`,subtype:`compact_boundary`,session_id:B(),uuid:t.uuid,compact_metadata:Ve(e.compactMetadata)}}if(t.subtype===`api_error`){let e=t;yield{type:`system`,subtype:`api_retry`,attempt:e.retryAttempt,max_retries:e.maxRetries,retry_delay_ms:e.retryInMs,error_status:e.error.status??null,error:fe(e.error),session_id:B(),uuid:t.uuid}}break}case`tool_use_summary`:{let t=e;yield{type:`tool_use_summary`,summary:t.summary,preceding_tool_use_ids:t.precedingToolUseIds,session_id:B(),uuid:t.uuid};break}}if(g!==void 0&&L()>=g){k&&(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await s(),yield{type:`result`,subtype:`error_max_budget_usd`,duration_ms:Date.now()-A,duration_api_ms:V(),is_error:!0,num_turns:X,stop_reason:Q,session_id:B(),total_cost_usd:L(),usage:this.totalUsage,modelUsage:z(),permission_denials:this.permissionDenials,fast_mode_state:q(J,j.fastMode),uuid:Z(),errors:[`Reached maximum budget ($${g}). Increase the limit with --max-budget-usd or start a new session.`]};return}if(e.type===`user`&&S){let e=w(this.mutableMessages,Le)-$e,n=parseInt(process.env.MAX_STRUCTURED_OUTPUT_RETRIES||`5`,10);if(e>=n){k&&(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await s(),yield{type:`result`,subtype:`error_max_structured_output_retries`,duration_ms:Date.now()-A,duration_api_ms:V(),is_error:!0,num_turns:X,stop_reason:Q,session_id:B(),total_cost_usd:L(),usage:this.totalUsage,modelUsage:z(),permission_denials:this.permissionDenials,fast_mode_state:q(J,j.fastMode),uuid:Z(),errors:[`Failed to provide valid structured output after ${n} attempts`]};return}}}let $=K.findLast(e=>e.type===`assistant`||e.type===`user`),et=$?.type??`undefined`,tt=$?.type===`assistant`?u($.message.content)?.type??`none`:`n/a`;if(k&&(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await s(),!l($,Q)){yield{type:`result`,subtype:`error_during_execution`,duration_ms:Date.now()-A,duration_api_ms:V(),is_error:!0,num_turns:X,stop_reason:Q,session_id:B(),total_cost_usd:L(),usage:this.totalUsage,modelUsage:z(),permission_denials:this.permissionDenials,fast_mode_state:q(J,j.fastMode),uuid:Z(),errors:(()=>{let e=Oe(),t=Qe?e.lastIndexOf(Qe)+1:0;return[`[ede_diagnostic] result_type=${et} last_content_type=${tt} stop_reason=${Q}`,...e.slice(t).map(e=>e.error)]})()};return}let nt=``,rt=!1;if($.type===`assistant`){let e=u($.message.content);e?.type===`text`&&!m.has(e.text)&&(nt=e.text),rt=!!$.isApiErrorMessage}yield{type:`result`,subtype:`success`,is_error:rt,duration_ms:Date.now()-A,duration_api_ms:V(),num_turns:X,result:nt,stop_reason:Q,session_id:B(),total_cost_usd:L(),usage:this.totalUsage,modelUsage:z(),permission_denials:this.permissionDenials,structured_output:Je,fast_mode_state:q(J,j.fastMode),uuid:Z()}}interrupt(){this.abortController.abort()}resetAbortController(){this.abortController=j()}getAbortSignal(){return this.abortController.signal}getMessages(){return this.mutableMessages}getReadFileState(){return this.readFileState}getSessionId(){return B()}setModel(e){this.config.userSpecifiedModel=e}};async function*Qe({commands:e,prompt:t,promptUuid:n,isMeta:r,cwd:i,tools:a,mcpClients:o,verbose:s=!1,thinkingConfig:c,maxTurns:l,maxBudgetUsd:u,taskBudget:d,canUseTool:ee,mutableMessages:te=[],getReadFileCache:p,setReadFileCache:ne,customSystemPrompt:m,appendSystemPrompt:h,userSpecifiedModel:g,fallbackModel:re,jsonSchema:_,getAppState:v,setAppState:ie,abortController:y,replayUserMessages:b=!1,includePartialMessages:ae=!1,handleElicitation:x,agents:oe=[],setSDKStatus:S,orphanedPermission:C}){let w=new Q({cwd:i,tools:a,commands:e,mcpClients:o,agents:oe??[],canUseTool:ee,getAppState:v,setAppState:ie,initialMessages:te,readFileCache:f(p()),customSystemPrompt:m,appendSystemPrompt:h,userSpecifiedModel:g,fallbackModel:re,thinkingConfig:c,maxTurns:l,maxBudgetUsd:u,taskBudget:d,jsonSchema:_,verbose:s,handleElicitation:x,replayUserMessages:b,includePartialMessages:ae,setSDKStatus:S,abortController:y,orphanedPermission:C});try{yield*w.submitMessage(t,{uuid:n,isMeta:r})}finally{ne(w.getReadFileState())}}export{Qe as n,Je as r,Q as t};
|