@readmagic/workmate 0.0.23 → 0.0.24
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-OgcBcK5A.js → AddWorkspaceDirectory-Ch8IcWXO.js} +1 -1
- package/dist/chunks/AgentsMdExternalIncludesDialog-Cyia0s4g.js +1 -0
- package/dist/chunks/{AgentsMdExternalIncludesDialog-CNEifEyV.js → AgentsMdExternalIncludesDialog-LjI_H_Au.js} +1 -1
- package/dist/chunks/{App-B-3tPQ3k.js → App-BOqh_1tN.js} +1 -1
- package/dist/chunks/{BackgroundTasksDialog-COuhHcey.js → BackgroundTasksDialog-CSEuuoq9.js} +1 -1
- package/dist/chunks/{BypassPermissionsModeDialog-bJek4siJ.js → BypassPermissionsModeDialog-CwfCwUr9.js} +1 -1
- package/dist/chunks/CustomSelect-wmZ9jz0W.js +1 -0
- package/dist/chunks/{DiffDialog-B3X9FMpO.js → DiffDialog-BpXIEWiE.js} +1 -1
- package/dist/chunks/Doctor-CMpr7tdf.js +1 -0
- package/dist/chunks/{Doctor-6PXyjIi6.js → Doctor-DqW6j3_B.js} +1 -1
- package/dist/chunks/{ExitFlow-DgAZp_8U.js → ExitFlow-DacaBTlk.js} +1 -1
- package/dist/chunks/{Grove-CHatOzcE.js → Grove-CNqYPWI6.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-DXL92MN9.js → InvalidConfigDialog-0TMJItCC.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-Dtmpzeps.js → InvalidSettingsDialog-iwh8H52b.js} +1 -1
- package/dist/chunks/{KeybindingProviderSetup-DA37QUFs.js → KeybindingProviderSetup-D49HHTXD.js} +1 -1
- package/dist/chunks/{MCPConnectionManager-thZd-xA_.js → MCPConnectionManager-Cie77ZAK.js} +1 -1
- package/dist/chunks/{MCPToolListView-CpY-YJg4.js → MCPToolListView-B4ehtkXd.js} +1 -1
- package/dist/chunks/{McpParsingWarnings-JvChf3xr.js → McpParsingWarnings-Bff66RtJ.js} +1 -1
- package/dist/chunks/{MessageSelector-C0_iw7SI.js → MessageSelector-Dpd6Iywp.js} +1 -1
- package/dist/chunks/{Messages-K4DDsDP9.js → Messages-DN7M3oS_.js} +1 -1
- package/dist/chunks/{Onboarding-C1UdzM-1.js → Onboarding-CQmE3rUf.js} +1 -1
- package/dist/chunks/{PromptInputFooterSuggestions-AyLog8p7.js → PromptInputFooterSuggestions-HI6HH3TP.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-oyic20ip.js → PromptInputHelpMenu-3QNUC2Cg.js} +1 -1
- package/dist/chunks/{ProviderSetup-XcBHjUnd.js → ProviderSetup-BCSPsvfv.js} +1 -1
- package/dist/chunks/{QueryEngine-DYxBjJ4i.js → QueryEngine-DdLWvJv6.js} +1 -1
- package/dist/chunks/{REPL-CQBJRrT0.js → REPL-BqO9KcK_.js} +5 -5
- package/dist/chunks/REPL-CmZmypfF.js +1 -0
- package/dist/chunks/{ResumeConversation-Dl8H9Gfy.js → ResumeConversation-DBqX7gva.js} +1 -1
- package/dist/chunks/SearchExtraToolsTool-BsSoILFj.js +1 -0
- package/dist/chunks/{SelectMulti-Bc6l11_K.js → SelectMulti-BQRHed-d.js} +1 -1
- package/dist/chunks/{Settings-TGp3fPrS.js → Settings-B-7yBewS.js} +3 -3
- package/dist/chunks/{Spinner-zYPFVFHN.js → Spinner-ByQXTvAA.js} +1 -1
- package/dist/chunks/{TextInput-CD9iau2k.js → TextInput-B8ruWRf2.js} +1 -1
- package/dist/chunks/{ThemePicker-0F0hZYPX.js → ThemePicker-BQErFFW1.js} +1 -1
- package/dist/chunks/{TrustDialog-C76YiMKz.js → TrustDialog-BIhz6AZE.js} +1 -1
- package/dist/chunks/{_baseEach-4ff-vRlp.js → _baseEach-CsIRoaTH.js} +1 -1
- package/dist/chunks/{add-dir-JMsRLGfx.js → add-dir-CrUDs19x.js} +1 -1
- package/dist/chunks/{agentDisplay-BReJUBWg.js → agentDisplay-M4pfwbMC.js} +1 -1
- package/dist/chunks/{agents-9qQ8I6zW.js → agents-CGaCQeLw.js} +1 -1
- package/dist/chunks/{agents-B3x8yJ_r.js → agents-DddX7lLX.js} +1 -1
- package/dist/chunks/{allErrors-DfWylHSw.js → allErrors-BF73lon8.js} +1 -1
- package/dist/chunks/{backgroundHousekeeping-CVNIhQg8.js → backgroundHousekeeping-Bq3LMsVR.js} +2 -2
- package/dist/chunks/backgroundHousekeeping-Cl3Ox7Qh.js +1 -0
- package/dist/chunks/{branch-C4TsMEkx.js → branch-Yg_taNlT.js} +1 -1
- package/dist/chunks/{btw-Dn1eYFAz.js → btw-udbprVvu.js} +1 -1
- package/dist/chunks/caches-ChjIEcdd.js +1 -0
- package/dist/chunks/{caches-DArHxBgL.js → caches-DLJ6urv-.js} +1 -1
- package/dist/chunks/{clear-Bdhb6b39.js → clear-B8ZtFPOK.js} +1 -1
- package/dist/chunks/commands-CVCpJo7M.js +1 -0
- package/dist/chunks/{compact-Bu9BUpxV.js → compact-izk6RKHQ.js} +1 -1
- package/dist/chunks/config-CFqpXMFX.js +1 -0
- package/dist/chunks/{context-CY_yfdYa.js → context-BbVm4SWK.js} +1 -1
- package/dist/chunks/{context-noninteractive-Dd4xIoP1.js → context-noninteractive-C7wrRZnM.js} +1 -1
- package/dist/chunks/context-noninteractive-x0HAzWhc.js +1 -0
- package/dist/chunks/conversation-DouVzO0K.js +1 -0
- package/dist/chunks/{conversation-DUu9qBnq.js → conversation-DrVkifKy.js} +1 -1
- package/dist/chunks/{conversationRecovery-2ft8sCPE.js → conversationRecovery-DliPBo_z.js} +1 -1
- package/dist/chunks/{crossProjectResume-6boHMUBx.js → crossProjectResume-DxMy05_P.js} +1 -1
- package/dist/chunks/{datadog-BPuGcxxC.js → datadog-Cu3s7P48.js} +1 -1
- package/dist/chunks/{diff-BOAElpfQ.js → diff-DdpHThJ7.js} +1 -1
- package/dist/chunks/doctor-D_kV_D_l.js +1 -0
- package/dist/chunks/{entry-TNOoyy7_.js → entry-Bxseqbi_.js} +1 -1
- package/dist/chunks/{esm-eTAUP-La.js → esm-BXTZz3av.js} +1 -1
- package/dist/chunks/{exit-DXApFJIP.js → exit-C_R_FgzR.js} +1 -1
- package/dist/chunks/{extraUsage-CmQaLPV1.js → extraUsage-xMuDiNKh.js} +1 -1
- package/dist/chunks/extractMemories-D4Dl1itt.js +1 -0
- package/dist/chunks/{fast-eGx2IxD7.js → fast-DH-C5IZs.js} +1 -1
- package/dist/chunks/fast-bopOPrtf.js +1 -0
- package/dist/chunks/fetchModelList-DC4VQpqa.js +1 -0
- package/dist/chunks/{fetchModelList-CxLsVNsu.js → fetchModelList-FE8tzTDc.js} +1 -1
- package/dist/chunks/{fileSuggestions-DHxdwq28.js → fileSuggestions-C-9unnoJ.js} +1 -1
- package/dist/chunks/{firstPartyEventLogger-M6UMli2c.js → firstPartyEventLogger-QmjjQmgt.js} +2 -2
- package/dist/chunks/firstPartyEventLogger-lFeqhtfh.js +1 -0
- package/dist/chunks/{gemini-D_ORb_L6.js → gemini-C_ApXgwc.js} +1 -1
- package/dist/chunks/{generateSessionName-BQoDduyA.js → generateSessionName-CQ03xlYI.js} +1 -1
- package/dist/chunks/{goal-D7c2mSds.js → goal-CdL29Y8C.js} +1 -1
- package/dist/chunks/{grok-B2-ZbUiR.js → grok-C6WAslUT.js} +1 -1
- package/dist/chunks/{help-CZJdRviD.js → help-DxanITNN.js} +1 -1
- package/dist/chunks/{history-CQiUERTL.js → history-BMycjPTT.js} +1 -1
- package/dist/chunks/hooks-D9ApLkBp.js +1 -0
- package/dist/chunks/{hooks-DIvN6gdv.js → hooks-DR3IYPJ3.js} +1 -1
- package/dist/chunks/{install-T_CV1Slu.js → install-0D9u2dZw.js} +1 -1
- package/dist/chunks/{instrumentation-BjqUZ383.js → instrumentation-BFiGwntt.js} +3 -3
- package/dist/chunks/{job-R6c4-3c8.js → job-YhJQWgE0.js} +1 -1
- package/dist/chunks/{keybindings-CLRaiL_Z.js → keybindings-DZrF9iNd.js} +1 -1
- package/dist/chunks/{launchLocalMemory-DrbKrwXc.js → launchLocalMemory-DhJ56KDc.js} +1 -1
- package/dist/chunks/{launchOnboarding-tqsMD8ni.js → launchOnboarding-DmMoZwv5.js} +1 -1
- package/dist/chunks/{loadAgentsDir-DlPbtIsS.js → loadAgentsDir-B0Anodo0.js} +23 -23
- package/dist/chunks/loadAgentsDir-BbUR6pqH.js +1 -0
- package/dist/chunks/{loadPluginHooks-C_msxVIc.js → loadPluginHooks-BSwCtQ6T.js} +1 -1
- package/dist/chunks/{localSearch-CK-sFzPm.js → localSearch-BxLYi6w_.js} +1 -1
- package/dist/chunks/localSearch-zfn7jgrh.js +1 -0
- package/dist/chunks/{logoUtils-x2pHV-Nl.js → logoUtils-CRxTutvr.js} +1 -1
- package/dist/chunks/{magicDocs-BEF8D3if.js → magicDocs-Bkz7ZcmL.js} +1 -1
- package/dist/chunks/{main-kOVUGxOS.js → main-9ksgUUY_.js} +5 -5
- package/dist/chunks/{mcp-D0wAJrRT.js → mcp-ChF12reQ.js} +1 -1
- package/dist/chunks/{mcp-mgOlm1cY.js → mcp-DoEl5uah.js} +1 -1
- package/dist/chunks/{mcp-BNd29r6p.js → mcp-hp9qqjAy.js} +2 -2
- package/dist/chunks/{memory-DDLk9_LJ.js → memory-Qv-wGNQ5.js} +1 -1
- package/dist/chunks/{mode-CcNsWgK3.js → mode-bFXPCR2P.js} +1 -1
- package/dist/chunks/{model-DzCP4K-9.js → model-6lkW4o2c.js} +1 -1
- package/dist/chunks/{model-BwBG0V1u.js → model-BvQFFOf8.js} +1 -1
- package/dist/chunks/{modelOptions-DRaG3bo0.js → modelOptions-BBvF3wHK.js} +1 -1
- package/dist/chunks/{nativeInstaller-C3pVPqrZ.js → nativeInstaller-CdjmE9Zy.js} +1 -1
- package/dist/chunks/{notifications-4wP1Tx9Y.js → notifications-Bc6k-Ozy.js} +1 -1
- package/dist/chunks/{onChangeAppState-BlaoFbYF.js → onChangeAppState-DLjZ1x95.js} +1 -1
- package/dist/chunks/{openai-CDN71NdX.js → openai-D46QvESE.js} +1 -1
- package/dist/chunks/{overlayContext-BT2Lq8ei.js → overlayContext-8--_fbvY.js} +1 -1
- package/dist/chunks/{partition-CIl_ORUT.js → partition-DznN4XZH.js} +1 -1
- package/dist/chunks/{permissions-zSNOZSwr.js → permissions-DmGFViHI.js} +1 -1
- package/dist/chunks/{pidLock-BTqO-h7Y.js → pidLock-Cm4sW35f.js} +2 -2
- package/dist/chunks/{plan-Bs6em6lk.js → plan-CzGBz_87.js} +1 -1
- package/dist/chunks/{plugin-DDDxjBa0.js → plugin-CluR79xX.js} +1 -1
- package/dist/chunks/{pluginAutoupdate-8qugAFhb.js → pluginAutoupdate-ennb9k8_.js} +1 -1
- package/dist/chunks/{pluginBlocklist-q01ackCf.js → pluginBlocklist-9OrNEh--.js} +1 -1
- package/dist/chunks/{pluginCliCommands-DXZfCZsv.js → pluginCliCommands-CJv5uhOG.js} +1 -1
- package/dist/chunks/{pluginFlagging-BG2MHCQJ.js → pluginFlagging-js_-WmYj.js} +1 -1
- package/dist/chunks/{pluginOperations-hXYLrzM2.js → pluginOperations-CcUSHAIa.js} +1 -1
- package/dist/chunks/pluginStartupCheck-CRBUO9gP.js +1 -0
- package/dist/chunks/{pluginStartupCheck-DTMa6TgL.js → pluginStartupCheck-SRXOyqr7.js} +1 -1
- package/dist/chunks/{plugins-COoGBYk6.js → plugins-IwwaCDba.js} +1 -1
- package/dist/chunks/{print-BASybEtO.js → print-CgszM1ea.js} +2 -2
- package/dist/chunks/{processBashCommand-DDi_Pymt.js → processBashCommand-D098WsqY.js} +1 -1
- package/dist/chunks/{processSlashCommand-Cq9kaoSF.js → processSlashCommand-DOQFjJ88.js} +1 -1
- package/dist/chunks/prompt-BKPmDAuL.js +1 -0
- package/dist/chunks/{prompt-mM79EGnT.js → prompt-CJ1l3XXk.js} +1 -1
- package/dist/chunks/prompt-CgOklk7z.js +1 -0
- package/dist/chunks/{promptEditor-DLGN_eLu.js → promptEditor-DoGHJN_W.js} +1 -1
- package/dist/chunks/{reconciler-CeXqh95g.js → reconciler-ykkSPR-i.js} +1 -1
- package/dist/chunks/{refresh-Ce2yk28a.js → refresh-Dn_I1R4v.js} +1 -1
- package/dist/chunks/{reject-Bld5E-bn.js → reject-DtcCfuZV.js} +1 -1
- package/dist/chunks/{reload-plugins-C42xSB5l.js → reload-plugins-CQZFQLWP.js} +1 -1
- package/dist/chunks/{rename-CtBghpxZ.js → rename-DyEfsZiq.js} +1 -1
- package/dist/chunks/{resume-BWkaTDqd.js → resume-BcXEDUqZ.js} +1 -1
- package/dist/chunks/{runtimeObserver-1wQO8HSZ.js → runtimeObserver-DEuR8z0f.js} +1 -1
- package/dist/chunks/{runtimeObserver-XQrOux41.js → runtimeObserver-PJ1o8GRA.js} +2 -2
- package/dist/chunks/sandbox-adapter-DfB9kgQD.js +1 -0
- package/dist/chunks/{sandbox-toggle-Dir9Polo.js → sandbox-toggle-D9GDUsTl.js} +1 -1
- package/dist/chunks/searchExtraTools-D4gMMQv0.js +1 -0
- package/dist/chunks/{select-Bxf5-5sI.js → select-DIxfl_VN.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-lbgHnVvi.js +1 -0
- package/dist/chunks/{sessionObserver-DS4G6mb9.js → sessionObserver-BtKjvteq.js} +1 -1
- package/dist/chunks/sessionObserver-D6qzEdGJ.js +1 -0
- package/dist/chunks/sessionStorage-C_7gow_z.js +1 -0
- package/dist/chunks/{sessionTracing-BoDDYLxW.js → sessionTracing-CtbeAD0s.js} +1 -1
- package/dist/chunks/{setup-BRypY6iT.js → setup-qecdf-ES.js} +2 -2
- package/dist/chunks/{shadowedRuleDetection-BRxZjobz.js → shadowedRuleDetection-Bg_aIc5Z.js} +1 -1
- package/dist/chunks/{sideQuestion-DLJxyrlp.js → sideQuestion-D49GsfH7.js} +1 -1
- package/dist/chunks/sinks-C-lP7uyO.js +1 -0
- package/dist/chunks/{sinks-Cz2HfgMU.js → sinks-De-B1lPQ.js} +1 -1
- package/dist/chunks/{skillChangeDetector-xviGstqm.js → skillChangeDetector-DkOJoNhT.js} +1 -1
- package/dist/chunks/{skillGapStore-CKN_d3pO.js → skillGapStore-CcFoHNLl.js} +2 -2
- package/dist/chunks/{skillLifecycle-BMY2JGGG.js → skillLifecycle-Bnz_4wE5.js} +2 -2
- package/dist/chunks/{skillSearchPanel-D9trHULQ.js → skillSearchPanel-C_5yUhqn.js} +2 -2
- package/dist/chunks/{skills-CX_AvwLG.js → skills-BE5scC-g.js} +1 -1
- package/dist/chunks/status-Dw09WZLd.js +1 -0
- package/dist/chunks/{statusNoticeHelpers-vFVgIYuw.js → statusNoticeHelpers-BRQpUIlH.js} +1 -1
- package/dist/chunks/switcher-CgZVah7U.js +1 -0
- package/dist/chunks/{switcher-CAajZeNL.js → switcher-DZwUo5Ed.js} +1 -1
- package/dist/chunks/{tasks-BWNQr2d3.js → tasks-DdcUQEeD.js} +1 -1
- package/dist/chunks/{templateJobs-gUET39Ho.js → templateJobs-C8qsPrLj.js} +1 -1
- package/dist/chunks/{theme-B7fKI6E5.js → theme-f1h2QI8J.js} +1 -1
- package/dist/chunks/{tipRegistry-DamZr34w.js → tipRegistry-B71o4qWr.js} +1 -1
- package/dist/chunks/{toolEventObserver-BL06sDI4.js → toolEventObserver-7QP38x4t.js} +1 -1
- package/dist/chunks/{toolPool-CX5wDBi1.js → toolPool-V-7Yv0GA.js} +1 -1
- package/dist/chunks/{use-select-navigation-BiUJdWai.js → use-select-navigation-hWL5VHnL.js} +1 -1
- package/dist/chunks/{useExitOnCtrlCDWithKeybindings-C9BYG8Bo.js → useExitOnCtrlCDWithKeybindings-BKwzUpgb.js} +1 -1
- package/dist/chunks/useMainLoopModel-DxvV70Ru.js +1 -0
- package/dist/chunks/{useManagePlugins-BqfIVa6E.js → useManagePlugins-BXLXazrR.js} +1 -1
- package/dist/chunks/useMergedTools-CCgnBJzO.js +1 -0
- package/dist/chunks/{useSearchInput-B25K1RnK.js → useSearchInput-CzopttqC.js} +1 -1
- package/dist/chunks/{useSettingsErrors-DYQ44kX4.js → useSettingsErrors-SFPWfxsA.js} +1 -1
- package/dist/chunks/{util-CtlC2dsN.js → util-Cbb3S6SX.js} +1 -1
- package/dist/chunks/{validatePlugin-D6tFo87L.js → validatePlugin-BMSoeb_b.js} +1 -1
- package/dist/chunks/worktree-Vm-SNY5x.js +1 -0
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/AgentsMdExternalIncludesDialog-CDNd5-7E.js +0 -1
- package/dist/chunks/CustomSelect-DoeEXOIP.js +0 -1
- package/dist/chunks/Doctor-DNgkgYhB.js +0 -1
- package/dist/chunks/REPL-CrVuMQY2.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-lv7VE50N.js +0 -1
- package/dist/chunks/backgroundHousekeeping-BGxHB_OX.js +0 -1
- package/dist/chunks/caches-BGzKwpnc.js +0 -1
- package/dist/chunks/commands-QepeBbFn.js +0 -1
- package/dist/chunks/config-D58C3_Lu.js +0 -1
- package/dist/chunks/context-noninteractive-BDDi3NLF.js +0 -1
- package/dist/chunks/conversation-B0wxBwzv.js +0 -1
- package/dist/chunks/doctor-CkLzqAMd.js +0 -1
- package/dist/chunks/extractMemories-xP63mv6R.js +0 -1
- package/dist/chunks/fast-C5nQH8rm.js +0 -1
- package/dist/chunks/fetchModelList-D24lRIgR.js +0 -1
- package/dist/chunks/firstPartyEventLogger-BVAogAX8.js +0 -1
- package/dist/chunks/hooks-BNuUlMzL.js +0 -1
- package/dist/chunks/loadAgentsDir-CcmY8zCj.js +0 -1
- package/dist/chunks/localSearch-DrUj0B-d.js +0 -1
- package/dist/chunks/pluginStartupCheck-HS1ZceZa.js +0 -1
- package/dist/chunks/prompt-CHobfCB1.js +0 -1
- package/dist/chunks/prompt-CMm6RHHc.js +0 -1
- package/dist/chunks/sandbox-adapter-8GO6eJxw.js +0 -1
- package/dist/chunks/searchExtraTools-BhDq8DTJ.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-CozocHQE.js +0 -1
- package/dist/chunks/sessionObserver-DGEQM4cO.js +0 -1
- package/dist/chunks/sessionStorage-BcAscOGE.js +0 -1
- package/dist/chunks/sinks-CGdKmq_8.js +0 -1
- package/dist/chunks/status-Daaak6Bo.js +0 -1
- package/dist/chunks/switcher-BpgmH4AI.js +0 -1
- package/dist/chunks/useMainLoopModel-DwjSVzzO.js +0 -1
- package/dist/chunks/useMergedTools-Bw8FchX8.js +0 -1
- package/dist/chunks/worktree-B8apCnVe.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./REPL-BqO9KcK_.js";export{e as REPL};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{$s as t,Dr as n,Ip as r,Ln as i,Lp as a,Mr as o,Xr as ee,Ys as s,Zr as te,_r as c,bb as l,bm as ne,mb as u,o_ as d,qn as re,s_ as f,xm as p,yr as m,zp as ie,zr as ae}from"./loadAgentsDir-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{$s as t,Dr as n,Ip as r,Ln as i,Lp as a,Mr as o,Xr as ee,Ys as s,Zr as te,_r as c,bb as l,bm as ne,mb as u,o_ as d,qn as re,s_ as f,xm as p,yr as m,zp as ie,zr as ae}from"./loadAgentsDir-B0Anodo0.js";import{I as h,P as g,Wt as _,ai as v,dr as oe,ot as se,t as y}from"./src-DL3w8VPk.js";import{t as b}from"./jsx-runtime-Bb4Xn-E0.js";import{It as x,Wn as S}from"./state-B4jiUise.js";import{o as C,s as w}from"./log-D2TIwHBV.js";import{n as T,r as E}from"./analytics-DJobLaWP.js";import{n as ce}from"./conversationRecovery-DliPBo_z.js";import{r as D,t as O}from"./Spinner-ByQXTvAA.js";import{a as le,n as ue,s as de}from"./skillChangeDetector-DkOJoNhT.js";import{t as fe}from"./REPL-BqO9KcK_.js";import{a as pe,i as k,n as A,o as j,r as M,t as N}from"./crossProjectResume-DxMy05_P.js";import{dirname as P}from"path";var F=e(v(),1);l(),x(),j(),D(),d(),y(),u(),T(),r(),p(),k(),s(),A(),C(),c();var I=b();function L(e){let t=parseInt(e,10);if(!isNaN(t)&&t>0)return t;let n=e.match(/github\.com\/[^/]+\/[^/]+\/pull\/(\d+)/);return n?.[1]?parseInt(n[1],10):null}function R({commands:e,worktreePaths:r,initialTools:s,mcpClients:c,dynamicMcpConfig:l,debug:u,mainThreadAgentDefinition:d,autoConnectIdeFlag:p,strictMcpConfig:_=!1,systemPrompt:v,appendSystemPrompt:y,initialSearchQuery:b,disableSlashCommands:x=!1,forkSession:C,taskListId:T,filterByPr:D,thinkingConfig:k,onTurnComplete:A}){let{rows:j}=se(),R=a(e=>e.agentDefinitions),V=ie(),[H,U]=F.useState([]),[me,W]=F.useState(!0),[he,ge]=F.useState(!1),[G,_e]=F.useState(!1),[K,ve]=F.useState(null),[q,J]=F.useState(null),Y=F.useRef(null),X=F.useRef(0),Z=F.useMemo(()=>{let e=H.filter(e=>!e.isSidechain);if(D!==void 0){if(D===!0)e=e.filter(e=>e.prNumber!==void 0);else if(typeof D==`number`)e=e.filter(e=>e.prNumber===D);else if(typeof D==`string`){let t=L(D);t!==null&&(e=e.filter(e=>e.prNumber===t))}}return e},[H,D]),ye=m();F.useEffect(()=>{o(r).then(e=>{Y.current=e,X.current=e.logs.length,U(e.logs),W(!1)}).catch(e=>{w(e),W(!1)})},[r]);let Q=F.useCallback(e=>{let t=Y.current;!t||t.nextIndex>=t.allStatLogs.length||re(t.allStatLogs,t.nextIndex,e).then(n=>{if(t.nextIndex=n.nextIndex,n.logs.length>0){let e=X.current;n.logs.forEach((t,n)=>{t.value=e+n}),U(e=>e.concat(n.logs)),X.current+=n.logs.length}else t.nextIndex<t.allStatLogs.length&&Q(e)})},[]),$=F.useCallback(e=>{W(!0),(e?n():o(r)).then(e=>{Y.current=e,X.current=e.logs.length,U(e.logs)}).catch(e=>{w(e)}).finally(()=>{W(!1)})},[r]),be=F.useCallback(()=>{let e=!G;_e(e),$(e)},[G,$]);function xe(){process.exit(1)}async function Se(e){ge(!0);let n=performance.now(),r=N(e,G);if(r.isCrossProject&&!r.isSameRepoWorktree){let e=r.command,t=await oe(e);t&&process.stdout.write(t),J(e);return}try{let r=await ce(e,void 0);if(!r)throw Error(`Failed to load conversation`);r.sessionId&&!C?(S(ne(r.sessionId),e.fullPath?P(e.fullPath):null),await ee(),f(r.sessionId)):C&&r.contentReplacements?.length&&await ae(r.contentReplacements);let{agentDefinition:a}=le(r.agentSetting,d,R);V(e=>({...e,agent:a?.agentType}));let o=ue(r.agentName,r.agentColor);o&&V(e=>({...e,standaloneAgentContext:o})),t(r.agentName),te(C?{...r,worktreeSession:void 0}:r),C||(de(r.worktreeSession),r.sessionId&&i()),E(`tengu_session_resumed`,{entrypoint:`picker`,success:!0,resume_duration_ms:Math.round(performance.now()-n)}),U([]),ve({messages:r.messages,fileHistorySnapshots:r.fileHistorySnapshots,contentReplacements:r.contentReplacements,agentName:r.agentName,agentColor:r.agentColor==="default"?void 0:r.agentColor,mainThreadAgentDefinition:a})}catch(e){throw E(`tengu_session_resumed`,{entrypoint:`picker`,success:!1}),w(e),e}}return q?(0,I.jsx)(B,{command:q}):K?(0,I.jsx)(fe,{debug:u,commands:e,initialTools:s,initialMessages:K.messages,initialFileHistorySnapshots:K.fileHistorySnapshots,initialContentReplacements:K.contentReplacements,initialAgentName:K.agentName,initialAgentColor:K.agentColor,mcpClients:c,dynamicMcpConfig:l,strictMcpConfig:_,systemPrompt:v,appendSystemPrompt:y,mainThreadAgentDefinition:K.mainThreadAgentDefinition,autoConnectIdeFlag:p,disableSlashCommands:x,taskListId:T,thinkingConfig:k,onTurnComplete:A}):me?(0,I.jsxs)(h,{children:[(0,I.jsx)(O,{}),(0,I.jsx)(g,{children:` Loading conversations…`})]}):he?(0,I.jsxs)(h,{children:[(0,I.jsx)(O,{}),(0,I.jsx)(g,{children:` Resuming conversation…`})]}):Z.length===0?(0,I.jsx)(z,{}):(0,I.jsx)(pe,{logs:Z,maxHeight:j,onCancel:xe,onSelect:Se,onLogsChanged:ye?()=>$(G):void 0,onLoadMore:Q,initialSearchQuery:b,showAllProjects:G,onToggleAllProjects:be,onAgenticSearch:M})}function z(){return _(`app:interrupt`,()=>{process.exit(1)},{context:`Global`}),(0,I.jsxs)(h,{flexDirection:`column`,children:[(0,I.jsx)(g,{children:`No conversations found to resume.`}),(0,I.jsx)(g,{dimColor:!0,children:`Press Ctrl+C to exit and start a new conversation.`})]})}function B({command:e}){return F.useEffect(()=>{let e=setTimeout(()=>{process.exit(0)},100);return()=>clearTimeout(e)},[]),(0,I.jsxs)(h,{flexDirection:`column`,gap:1,children:[(0,I.jsx)(g,{children:`This conversation is from a different directory.`}),(0,I.jsxs)(h,{flexDirection:`column`,children:[(0,I.jsx)(g,{children:`To resume, run:`}),(0,I.jsxs)(g,{children:[` `,e]})]}),(0,I.jsx)(g,{dimColor:!0,children:`(Command copied to clipboard)`})]})}export{R as ResumeConversation};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{lh as e,uh as t}from"./loadAgentsDir-B0Anodo0.js";t();export{e as clearSearchExtraToolsDescriptionCache};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./figures-5ThXQEtq.js";import{I as i,P as a,ai as o,hn as s,t as c}from"./src-DL3w8VPk.js";import{t as l}from"./jsx-runtime-Bb4Xn-E0.js";import{c as u,o as d,s as f}from"./stringUtils-C718f5ey.js";import{a as p,i as m,n as h,o as g,r as _,t as v}from"./use-select-navigation-
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./figures-5ThXQEtq.js";import{I as i,P as a,ai as o,hn as s,t as c}from"./src-DL3w8VPk.js";import{t as l}from"./jsx-runtime-Bb4Xn-E0.js";import{c as u,o as d,s as f}from"./stringUtils-C718f5ey.js";import{a as p,i as m,n as h,o as g,r as _,t as v}from"./use-select-navigation-hWL5VHnL.js";import{i as y,t as b}from"./overlayContext-8--_fbvY.js";import{isDeepStrictEqual as x}from"util";function S({isDisabled:e=!1,visibleOptionCount:t=5,options:n,defaultValue:r=[],onChange:i,onCancel:a,onFocus:o,focusValue:c,submitButtonText:l,onSubmit:d,onDownFromLastItem:p,onUpFromFirstItem:m,initialFocusLast:g,hideIndexes:_=!1}){let[v,b]=(0,C.useState)(r),[S,w]=(0,C.useState)(!1),[T,E]=(0,C.useState)(n);n!==T&&!x(n,T)&&(b(r),E(n));let[D,O]=(0,C.useState)(()=>{let e=new Map;return n.forEach(t=>{t.type===`input`&&t.initialValue&&e.set(t.value,t.initialValue)}),e}),k=(0,C.useCallback)(e=>{let t=typeof e==`function`?e(v):e;b(t),i?.(t)},[v,i]),A=h({visibleOptionCount:t,options:n,initialFocusValue:g?n[n.length-1]?.value:void 0,onFocus:o,focusValue:c});y(`multi-select`,void 0);let j=(0,C.useCallback)((e,t)=>{O(n=>{let r=new Map(n);return r.set(e,t),r});let r=n.find(t=>t.value===e);r&&r.type===`input`&&r.onChange(t),k(n=>t?n.includes(e)?n:[...n,e]:n.filter(t=>t!==e))},[n,k]);return s((e,t,r)=>{let i=f(e),o=n.find(e=>e.value===A.focusedValue)?.type===`input`;if(o&&!(t.upArrow||t.downArrow||t.escape||t.tab||t.return||t.ctrl&&(e===`n`||e===`p`||t.return)))return;let s=n[n.length-1]?.value;if(t.tab&&!t.shift){l&&d&&A.focusedValue===s&&!S?w(!0):S||A.focusNextOption();return}if(t.tab&&t.shift){l&&d&&S?(w(!1),A.focusOption(s)):A.focusPreviousOption();return}if(t.downArrow||t.ctrl&&e===`n`||!t.ctrl&&!t.shift&&e===`j`){S&&p?p():l&&d&&A.focusedValue===s&&!S?w(!0):!l&&p&&A.focusedValue===s?p():S||A.focusNextOption();return}if(t.upArrow||t.ctrl&&e===`p`||!t.ctrl&&!t.shift&&e===`k`){l&&d&&S?(w(!1),A.focusOption(s)):m&&A.focusedValue===n[0]?.value?m():A.focusPreviousOption();return}if(t.pageDown){A.focusNextPage();return}if(t.pageUp){A.focusPreviousPage();return}if(t.return||u(e)===` `){if(t.ctrl&&t.return&&o&&d){d(v);return}if(S&&d){d(v);return}if(t.return&&!l&&d){d(v);return}if(A.focusedValue!==void 0){let e=v.includes(A.focusedValue)?v.filter(e=>e!==A.focusedValue):[...v,A.focusedValue];k(e)}return}if(!_&&/^[0-9]+$/.test(i)){let e=parseInt(i,10)-1;if(e>=0&&e<n.length){let t=n[e].value,r=v.includes(t)?v.filter(e=>e!==t):[...v,t];k(r)}return}t.escape&&(a(),r.stopImmediatePropagation())},{isActive:!e}),{...A,selectedValues:v,inputValues:D,isSubmitFocused:S,updateInputValue:j,onCancel:a}}var C,w=e((()=>{C=t(o(),1),b(),c(),d(),v()}));function T({isDisabled:e=!1,visibleOptionCount:t=5,options:n,defaultValue:o=[],onCancel:s,onChange:c,onFocus:l,focusValue:u,submitButtonText:d,onSubmit:f,onDownFromLastItem:m,onUpFromFirstItem:h,initialFocusLast:g,onOpenEditor:v,hideIndexes:y=!1,onImagePaste:b,pastedContents:x,onRemoveImage:C}){let w=S({isDisabled:e,visibleOptionCount:t,options:n,defaultValue:o,onChange:c,onCancel:s,onFocus:l,focusValue:u,submitButtonText:d,onSubmit:f,onDownFromLastItem:m,onUpFromFirstItem:h,initialFocusLast:g,hideIndexes:y}),T=n.length.toString().length;return(0,E.jsxs)(i,{flexDirection:`column`,children:[(0,E.jsx)(i,{flexDirection:`column`,children:w.visibleOptions.map((t,o)=>{let c=!e&&w.focusedValue===t.value&&!w.isSubmitFocused,l=w.selectedValues.includes(t.value),u=t.index===w.visibleFromIndex,d=t.index===w.visibleToIndex-1,f=w.visibleToIndex<n.length,m=w.visibleFromIndex>0,h=w.visibleFromIndex+o+1;if(t.type===`input`){let e=w.inputValues.get(t.value)||``;return(0,E.jsx)(i,{gap:1,children:(0,E.jsx)(_,{option:t,isFocused:c,isSelected:!1,shouldShowDownArrow:f&&d,shouldShowUpArrow:m&&u,maxIndexWidth:T,index:h,inputValue:e,onInputChange:e=>{w.updateInputValue(t.value,e)},onSubmit:()=>{},onExit:()=>{s()},layout:`compact`,onOpenEditor:v,onImagePaste:b,pastedContents:x,onRemoveImage:C,children:(0,E.jsxs)(a,{color:l?`success`:void 0,children:[`[`,l?r.tick:` `,`] `]})})},String(t.value))}return(0,E.jsx)(i,{gap:1,children:(0,E.jsxs)(p,{isFocused:c,isSelected:!1,shouldShowDownArrow:f&&d,shouldShowUpArrow:m&&u,description:t.description,children:[!y&&(0,E.jsx)(a,{dimColor:!0,children:`${h}.`.padEnd(T)}),(0,E.jsxs)(a,{color:l?`success`:void 0,children:[`[`,l?r.tick:` `,`]`]}),(0,E.jsx)(a,{color:c?`suggestion`:void 0,children:t.label})]})},String(t.value))})}),d&&f&&(0,E.jsxs)(i,{marginTop:0,gap:1,children:[w.isSubmitFocused?(0,E.jsx)(a,{color:`suggestion`,children:r.pointer}):(0,E.jsx)(a,{children:` `}),(0,E.jsx)(i,{marginLeft:3,children:(0,E.jsx)(a,{color:w.isSubmitFocused?`suggestion`:void 0,bold:!0,children:d})})]})]})}var E,D=e((()=>{n(),c(),m(),g(),w(),E=l()}));export{D as n,T as t};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{l as n,n as r,o as i,t as a}from"./envUtils-DfkgIdYf.js";import{n as o,t as s}from"./figures-5ThXQEtq.js";import{Da as ee,I_ as te,Ip as c,L_ as ne,Lp as l,M_ as u,N_ as re,Oa as d,Op as f,P_ as p,Rp as ie,__ as ae,_r as m,b as h,bb as oe,g_ as g,h_ as se,j as ce,ka as le,kp as ue,mb as de,md as _,p_ as fe,pd as v,tr as pe,v_ as me,y_ as y,z_ as he,zp as ge}from"./loadAgentsDir-
|
|
2
|
-
`,`Please restart your IDE and try again.`]})}];if(t.installed)return r&&r.type===`connected`?t.installedVersion===r.serverInfo?.version?[{label:`IDE`,value:`Connected to ${e} ${i} version ${t.installedVersion}`}]:[{label:`IDE`,value:`Connected to ${e} ${i} version ${t.installedVersion} (server version: ${r.serverInfo?.version})`}]:[{label:`IDE`,value:`Installed ${e} ${i}`}]}else if(r){let e=u(r)??`IDE`;return r.type===`connected`?[{label:`IDE`,value:`Connected to ${e} extension`}]:[{label:`IDE`,value:`${D(`error`,n)(s.cross)} Not connected to ${e}`}]}return[]}function Rt(e=[],t){let n=e.filter(e=>e.name!==`ide`);if(!n.length)return[];let r={connected:0,pending:0,needsAuth:0,failed:0};for(let e of n)e.type===`connected`?r.connected++:e.type===`pending`?r.pending++:e.type===`needs-auth`?r.needsAuth++:r.failed++;let i=[];return r.connected&&i.push(D(`success`,t)(`${r.connected} connected`)),r.needsAuth&&i.push(D(`warning`,t)(`${r.needsAuth} need auth`)),r.pending&&i.push(D(`inactive`,t)(`${r.pending} pending`)),r.failed&&i.push(D(`error`,t)(`${r.failed} failed`)),[{label:`MCP servers`,value:`${i.join(`, `)} ${D(`inactive`,t)(`· /mcp`)}`}]}async function zt(){let e=g(await ae()),t=[];return e.forEach(e=>{let n=Ue(e.path);t.push(`Large ${n} will impact performance (${z(e.content.length)} chars > ${z(fe)})`)}),t}function Bt(){return[{label:`Setting sources`,value:P().filter(e=>{let t=Be(e);return t!==null&&Object.keys(t).length>0}).map(e=>{if(e===`policySettings`){let e=Ie();if(e===null)return null;switch(e){case`plist`:return`Enterprise managed settings (plist)`;case`hklm`:return`Enterprise managed settings (HKLM)`;case`file`:{let{hasBase:e,hasDropIns:t}=ze();return e&&t?`Enterprise managed settings (file + drop-ins)`:t?`Enterprise managed settings (drop-ins)`:`Enterprise managed settings (file)`}case`hkcu`:return`Enterprise managed settings (HKCU)`}}return Fe(e)}).filter(e=>e!==null)}]}async function Vt(){return(await W()).map(e=>e.message)}async function Ht(){let e=await bt(),t=[],{errors:n}=Ct();if(n.length>0){let e=Array.from(new Set(n.map(e=>e.file))).join(`, `);t.push(`Found invalid settings files: ${e}. They will be ignored.`)}return e.warnings.forEach(e=>{t.push(e.issue)}),e.hasUpdatePermissions===!1&&t.push(`No write permissions for auto-updates (requires sudo)`),t}function Ut(){return[]}function Wt(){let e=V(),t=[];if(e!==`firstParty`){let n={bedrock:`AWS Bedrock`,vertex:`Google Vertex AI`,foundry:`Microsoft Foundry`,gemini:`Gemini API`,grok:`Grok API`,openai:`OpenAI API`}[e];t.push({label:`API provider`,value:n})}if(e===`firstParty`){let e=process.env.ANTHROPIC_BASE_URL;e&&t.push({label:`API base URL`,value:e})}else if(e===`bedrock`){let e=process.env.BEDROCK_BASE_URL;e&&t.push({label:`Bedrock base URL`,value:e}),t.push({label:`AWS region`,value:a()}),n(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH)&&t.push({value:`AWS auth skipped`})}else if(e===`vertex`){let e=process.env.VERTEX_BASE_URL;e&&t.push({label:`Vertex base URL`,value:e});let i=process.env.ANTHROPIC_VERTEX_PROJECT_ID;i&&t.push({label:`GCP project`,value:i}),t.push({label:`Default region`,value:r()}),n(process.env.CLAUDE_CODE_SKIP_VERTEX_AUTH)&&t.push({value:`GCP auth skipped`})}else if(e===`foundry`){let e=process.env.ANTHROPIC_FOUNDRY_BASE_URL;e&&t.push({label:`Microsoft Foundry base URL`,value:e});let r=process.env.ANTHROPIC_FOUNDRY_RESOURCE;r&&t.push({label:`Microsoft Foundry resource`,value:r}),n(process.env.CLAUDE_CODE_SKIP_FOUNDRY_AUTH)&&t.push({value:`Microsoft Foundry auth skipped`})}else if(e===`gemini`){let e=process.env.GEMINI_BASE_URL||`https://generativelanguage.googleapis.com/v1beta`;t.push({label:`Gemini base URL`,value:e})}else if(e===`grok`){let e=process.env.GROK_BASE_URL;t.push({label:`Grok base URL`,value:e})}else if(e===`openai`){let e=process.env.OPENAI_BASE_URL;t.push({label:`OpenAI base URL`,value:e})}let i=ct();i&&t.push({label:`Proxy`,value:i});let o=ut();return process.env.NODE_EXTRA_CA_CERTS&&t.push({label:`Additional CA cert(s)`,value:process.env.NODE_EXTRA_CA_CERTS}),o&&(o.cert&&process.env.CLAUDE_CODE_CLIENT_CERT&&t.push({label:`mTLS client cert`,value:process.env.CLAUDE_CODE_CLIENT_CERT}),o.key&&process.env.CLAUDE_CODE_CLIENT_KEY&&t.push({label:`mTLS client key`,value:process.env.CLAUDE_CODE_CLIENT_KEY})),t}function Gt(e){return ot(e)}var Kt,qt=e((()=>{o(),k(),y(),yt(),i(),He(),Ze(),p(),at(),it(),dt(),xt(),lt(),St(),Re(),N(),Kt=A()}));function Jt(){let e=Oe();return[{label:`Version`,value:`0.0.23`},{label:`Session name`,value:pe(e)??(0,G.jsx)(S,{dimColor:!0,children:`/rename to add a name`})},{label:`Session ID`,value:e},{label:`cwd`,value:Ae()},...Ut(),...Wt()]}function Yt({mainLoopModel:e,mcp:t,theme:n,context:r}){return[{label:`Model`,value:Gt(e)},...Lt(t.clients,r.options.ideInstallationStatus,n),...Rt(t.clients,n),...It(),...Bt()]}async function Xt(){return[...await Vt(),...await Ht(),...await zt()]}function Zt({value:e}){return Array.isArray(e)?(0,G.jsx)(x,{flexWrap:`wrap`,columnGap:1,flexShrink:99,children:e.map((t,n)=>(0,G.jsxs)(S,{children:[t,n<e.length-1?`,`:``]},n))}):typeof e==`string`?(0,G.jsx)(S,{children:e}):e}function Qt({context:e,diagnosticsPromise:t}){let n=l(e=>e.mainLoopModel),r=l(e=>e.mcp),[i]=ve(),a=en.useMemo(()=>[Jt(),Yt({mainLoopModel:n,mcp:r,theme:i,context:e})],[n,r,i,e]),o=vt()?1:void 0;return(0,G.jsxs)(x,{flexDirection:`column`,flexGrow:o,children:[(0,G.jsxs)(x,{flexDirection:`column`,gap:1,flexGrow:o,children:[a.map((e,t)=>e.length>0&&(0,G.jsx)(x,{flexDirection:`column`,children:e.map(({label:e,value:t},n)=>(0,G.jsxs)(x,{flexDirection:`row`,gap:1,flexShrink:0,children:[e!==void 0&&(0,G.jsxs)(S,{bold:!0,children:[e,`:`]}),(0,G.jsx)(Zt,{value:t})]},n))},t)),(0,G.jsx)(tn.Suspense,{fallback:null,children:(0,G.jsx)($t,{promise:t})})]}),(0,G.jsx)(S,{dimColor:!0,children:(0,G.jsx)(v,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})})]})}function $t({promise:e}){let t=(0,tn.use)(e);return t.length===0?null:(0,G.jsxs)(x,{flexDirection:`column`,paddingBottom:1,children:[(0,G.jsx)(S,{bold:!0,children:`System Diagnostics`}),t.map((e,t)=>(0,G.jsxs)(x,{flexDirection:`row`,gap:1,paddingX:1,children:[(0,G.jsx)(S,{color:`error`,children:s.warning}),typeof e==`string`?(0,G.jsx)(S,{wrap:`wrap`,children:e}):e]},t))]})}var en,tn,G,nn=e((()=>{o(),en=t(w(),1),tn=t(w(),1),j(),_t(),k(),c(),ke(),m(),qt(),_(),G=A()}));function rn({currentVersion:e,onChoice:t}){function n(e){t(e)}function r(){t(`cancel`)}return(0,K.jsxs)(De,{title:`Switch to Stable Channel`,onCancel:r,color:`permission`,hideBorder:!0,hideInputGuide:!0,children:[(0,K.jsxs)(S,{children:[`The stable channel may have an older version than what you're currently running (`,e,`).`]}),(0,K.jsx)(S,{dimColor:!0,children:`How would you like to handle this?`}),(0,K.jsx)(gt,{options:[{label:`Allow possible downgrade to stable version`,value:`downgrade`},{label:`Stay on current version (${e}) until stable catches up`,value:`stay`}],onChange:n})]})}var K,an=e((()=>{k(),wt(),K=A()}));function on(e){return Object.entries(e).map(([e,t])=>({label:t?.name??ln,value:e,description:t?.description??un}))}function sn({initialStyle:e,onComplete:t,onCancel:n,isStandaloneCommand:r}){let[i,a]=(0,cn.useState)([]),[o,s]=(0,cn.useState)(!0);(0,cn.useEffect)(()=>{d(Ae()).then(e=>{let t=on(e);a(t),s(!1)}).catch(()=>{let e=on(ee);a(e),s(!1)})},[]);let te=(0,cn.useCallback)(e=>{t(e)},[t]);return(0,q.jsx)(De,{title:`Preferred output style`,onCancel:n,hideInputGuide:!r,hideBorder:!r,children:(0,q.jsxs)(x,{flexDirection:`column`,gap:1,children:[(0,q.jsx)(x,{marginTop:1,children:(0,q.jsx)(S,{dimColor:!0,children:`This changes how Work Mate communicates with you`})}),o?(0,q.jsx)(S,{dimColor:!0,children:`Loading output styles…`}):(0,q.jsx)(gt,{options:i,onChange:te,visibleOptionCount:10,defaultValue:e})]})})}var cn,q,ln,un,dn=e((()=>{cn=t(w(),1),le(),k(),ke(),ht(),q=A(),ln=`Default`,un=`Work Mate completes coding tasks efficiently and provides concise responses`}));function fn({initialLanguage:e,onComplete:t,onCancel:n}){let[r,i]=(0,pn.useState)(e),[a,o]=(0,pn.useState)((e??``).length);be(`confirm:no`,n,{context:`Settings`});function ee(){let e=r?.trim();t(e||void 0)}return(0,J.jsxs)(x,{flexDirection:`column`,gap:1,children:[(0,J.jsx)(S,{children:`Enter your preferred response and voice language:`}),(0,J.jsxs)(x,{flexDirection:`row`,gap:1,children:[(0,J.jsx)(S,{children:s.pointer}),(0,J.jsx)(H,{value:r??``,onChange:i,onSubmit:ee,focus:!0,showCursor:!0,placeholder:`e.g., Japanese, 日本語, Español${s.ellipsis}`,columns:60,cursorOffset:a,onChangeCursorOffset:o})]}),(0,J.jsx)(S,{dimColor:!0,children:`Leave empty for default (English)`})]})}var pn,J,mn=e((()=>{o(),pn=t(w(),1),k(),de(),ft(),J=A()}));function hn({onClose:e,context:t,setTabsHidden:r,onIsSearchModeChange:i,contentHeight:a}){let{headerFocused:o,focusHeader:ee}=Se(),te=vt(),[,c]=ve(),u=ye(),[d,f]=(0,X.useState)(I()),p=Y.useRef(I()),[m,h]=(0,X.useState)(Ve()),oe=Y.useRef(Ve()),[g,le]=(0,X.useState)(m?.outputStyle||`default`),de=Y.useRef(g),[_,fe]=(0,X.useState)(m?.language),pe=Y.useRef(_),[y,he]=(0,X.useState)(0),[w,E]=(0,X.useState)(0),[D,O]=(0,X.useState)(!1),Te=xe(),{rows:k}=we(),Ee=a??Math.min(Math.floor(k*.8),30),A=Math.max(5,Ee-10),j=l(e=>e.mainLoopModel),Oe=l(e=>e.verbose),ke=l(e=>e.thinkingEnabled),Ae=l(e=>$e()?e.fastMode:!1);l(e=>e.promptSuggestionEnabled);let Fe=Ne(m?.permissions?.defaultMode??`default`),N=ge(),[Ie,P]=(0,X.useState)({}),Le=Y.useRef(ke),[Re]=(0,X.useState)(()=>Be(`localSettings`)),[ze]=(0,X.useState)(()=>Be(`userSettings`)),He=Y.useRef(u),Ue=ie(),[Je]=(0,X.useState)(()=>{let e=Ue.getState();return{mainLoopModel:e.mainLoopModel,mainLoopModelForSession:e.mainLoopModelForSession,verbose:e.verbose,thinkingEnabled:e.thinkingEnabled,fastMode:e.fastMode,promptSuggestionEnabled:e.promptSuggestionEnabled,settings:e.settings}}),L=Y.useRef(!1),[Xe,Ze]=(0,X.useState)(!1),[z,B]=(0,X.useState)(null),{query:V,setQuery:it,cursorOffset:at}=Pt({isActive:D&&z===null&&!o,onExit:()=>O(!1),onExitUp:ee,passthroughCtrlKeys:[`c`,`d`]}),ct=D&&!o;Y.useEffect(()=>{i?.(ct)},[ct,i]);let lt=re(t.options.mcpClients),ut=!n(process.env.CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING),dt=Y.use(ae(!0)),ft=me(dt),H=Ge();function pt(e){R(`tengu_config_model_changed`,{from_model:j,to_model:e}),N(t=>({...t,mainLoopModel:e,mainLoopModelForSession:null})),P(t=>{let n=ot(e)+(Ot(e,!1,st())?` · Billed as extra usage`:``);if(`model`in t){let{model:e,...r}=t;return{...r,model:n}}return{...t,model:n}})}function mt(e){F(t=>({...t,verbose:e})),f({...I(),verbose:e}),N(t=>({...t,verbose:e})),P(t=>{if(`verbose`in t){let{verbose:e,...n}=t;return n}return{...t,verbose:e}})}let ht=[{id:`autoCompactEnabled`,label:`Auto-compact`,value:d.autoCompactEnabled,type:`boolean`,onChange(e){F(t=>({...t,autoCompactEnabled:e})),f({...I(),autoCompactEnabled:e}),R(`tengu_auto_compact_setting_changed`,{enabled:e})}},{id:`spinnerTipsEnabled`,label:`Show tips`,value:m?.spinnerTipsEnabled??!0,type:`boolean`,onChange(e){M(`localSettings`,{spinnerTipsEnabled:e}),h(t=>({...t,spinnerTipsEnabled:e})),R(`tengu_tips_setting_changed`,{enabled:e})}},{id:`cacheWarningEnabled`,label:`Cache warnings`,value:m?.cacheWarningEnabled??!0,type:`boolean`,onChange(e){M(`localSettings`,{cacheWarningEnabled:e}),h(t=>({...t,cacheWarningEnabled:e})),R(`tengu_cache_warning_setting_changed`,{enabled:e})}},{id:`prefersReducedMotion`,label:`Reduce motion`,value:m?.prefersReducedMotion??!1,type:`boolean`,onChange(e){M(`localSettings`,{prefersReducedMotion:e}),h(t=>({...t,prefersReducedMotion:e})),N(t=>({...t,settings:{...t.settings,prefersReducedMotion:e}})),R(`tengu_reduce_motion_setting_changed`,{enabled:e})}},{id:`thinkingEnabled`,label:`Thinking mode`,value:ke??!0,type:`boolean`,onChange(e){N(t=>({...t,thinkingEnabled:e})),M(`userSettings`,{alwaysThinkingEnabled:e?void 0:!1}),R(`tengu_thinking_toggled`,{enabled:e})}},...$e()&&rt()?[{id:`fastMode`,label:`Fast mode (${tt} only)`,value:!!Ae,type:`boolean`,onChange(e){nt(),M(`userSettings`,{fastMode:e?!0:void 0}),e?(N(e=>({...e,mainLoopModel:Qe(),mainLoopModelForSession:null,fastMode:!0})),P(e=>({...e,model:Qe(),"Fast mode":`ON`}))):(N(e=>({...e,fastMode:!1})),P(e=>({...e,"Fast mode":`OFF`})))}}]:[],...ut?[{id:`fileCheckpointingEnabled`,label:`Rewind code (checkpoints)`,value:d.fileCheckpointingEnabled,type:`boolean`,onChange(e){F(t=>({...t,fileCheckpointingEnabled:e})),f({...I(),fileCheckpointingEnabled:e}),R(`tengu_file_history_snapshots_setting_changed`,{enabled:e})}}]:[],{id:`verbose`,label:`Verbose output`,value:Oe,type:`boolean`,onChange:mt},{id:`terminalProgressBarEnabled`,label:`Terminal progress bar`,value:d.terminalProgressBarEnabled,type:`boolean`,onChange(e){F(t=>({...t,terminalProgressBarEnabled:e})),f({...I(),terminalProgressBarEnabled:e}),R(`tengu_terminal_progress_bar_setting_changed`,{enabled:e})}},{id:`showTurnDuration`,label:`Show turn duration`,value:d.showTurnDuration,type:`boolean`,onChange(e){F(t=>({...t,showTurnDuration:e})),f({...I(),showTurnDuration:e}),R(`tengu_show_turn_duration_setting_changed`,{enabled:e})}},{id:`defaultPermissionMode`,label:`Default permission mode`,value:Fe,options:(()=>{let e=[`default`,`plan`];return[...e,...We.filter(t=>!e.includes(t))]})(),type:`enum`,onChange(e){let t=Ne(e),n=t===`auto`?t:Me(t)?Pe(t):t,r=M(`userSettings`,{permissions:{...m?.permissions,defaultMode:n}});if(r.error){Ye(r.error);return}h(e=>({...e,permissions:{...e?.permissions,defaultMode:n}})),P(t=>({...t,defaultPermissionMode:e})),R(`tengu_config_changed`,{setting:`defaultPermissionMode`,value:e})}},{id:`respectGitignore`,label:`Respect .gitignore in file picker`,value:d.respectGitignore,type:`boolean`,onChange(e){F(t=>({...t,respectGitignore:e})),f({...I(),respectGitignore:e}),R(`tengu_respect_gitignore_setting_changed`,{enabled:e})}},...ue()?[{id:`copyOnSelect`,label:`Copy on select`,value:d.copyOnSelect??!0,type:`boolean`,onChange(e){F(t=>({...t,copyOnSelect:e})),f({...I(),copyOnSelect:e}),R(`tengu_config_changed`,{setting:`copyOnSelect`,value:String(e)})}}]:[],H?{id:`autoUpdatesChannel`,label:`Auto-update channel`,value:`disabled`,type:`managedEnum`,onChange(){}}:{id:`autoUpdatesChannel`,label:`Auto-update channel`,value:m?.autoUpdatesChannel??`latest`,type:`managedEnum`,onChange(){}},{id:`theme`,label:`Theme`,value:u,type:`managedEnum`,onChange:c},{id:`notifChannel`,label:`Notifications`,value:d.preferredNotifChannel,options:[`auto`,`iterm2`,`terminal_bell`,`iterm2_with_bell`,`kitty`,`ghostty`,`notifications_disabled`],type:`enum`,onChange(e){F(t=>({...t,preferredNotifChannel:e})),f({...I(),preferredNotifChannel:e})}},{id:`outputStyle`,label:`Output style`,value:g,type:`managedEnum`,onChange:()=>{}},{id:`language`,label:`Language`,value:_??`Default (English)`,type:`managedEnum`,onChange:()=>{}},{id:`editorMode`,label:`Editor mode`,value:d.editorMode===`emacs`?`normal`:d.editorMode||`normal`,options:[`normal`,`vim`],type:`enum`,onChange(e){F(t=>({...t,editorMode:e})),f({...I(),editorMode:e}),R(`tengu_editor_mode_changed`,{mode:e,source:`config_panel`})}},{id:`prStatusFooterEnabled`,label:`Show PR status footer`,value:d.prStatusFooterEnabled??!0,type:`boolean`,onChange(e){F(t=>t.prStatusFooterEnabled===e?t:{...t,prStatusFooterEnabled:e}),f({...I(),prStatusFooterEnabled:e}),R(`tengu_pr_status_footer_setting_changed`,{enabled:e})}},{id:`model`,label:`Model`,value:j===null?`Default (recommended)`:j,type:`managedEnum`,onChange:pt},...lt?[{id:`diffTool`,label:`Diff tool`,value:d.diffTool??`auto`,options:[`terminal`,`auto`],type:`enum`,onChange(e){F(t=>({...t,diffTool:e})),f({...I(),diffTool:e}),R(`tengu_diff_tool_changed`,{tool:e,source:`config_panel`})}}]:[],...ne()?[]:[{id:`autoConnectIde`,label:`Auto-connect to IDE (external terminal)`,value:d.autoConnectIde??!1,type:`boolean`,onChange(e){F(t=>({...t,autoConnectIde:e})),f({...I(),autoConnectIde:e}),R(`tengu_auto_connect_ide_changed`,{enabled:e,source:`config_panel`})}}],...ne()?[{id:`autoInstallIdeExtension`,label:`Auto-install IDE extension`,value:d.autoInstallIdeExtension??!0,type:`boolean`,onChange(e){F(t=>({...t,autoInstallIdeExtension:e})),f({...I(),autoInstallIdeExtension:e}),R(`tengu_auto_install_ide_extension_changed`,{enabled:e,source:`config_panel`})}}]:[],...ft?[{id:`showExternalIncludesDialog`,label:`External AGENTS.md includes`,value:qe().hasAgentsMdExternalIncludesApproved?`true`:`false`,type:`managedEnum`,onChange(){}}]:[]],U=Y.useMemo(()=>{if(!V)return ht;let e=V.toLowerCase();return ht.filter(t=>t.id.toLowerCase().includes(e)?!0:(`searchText`in t?t.searchText:t.label).toLowerCase().includes(e))},[ht,V]);Y.useEffect(()=>{if(y>=U.length){let e=Math.max(0,U.length-1);he(e),E(Math.max(0,e-A+1));return}E(e=>y<e?y:y>=e+A?y-A+1:e)},[U.length,y,A]);let _t=(0,X.useCallback)(e=>{E(t=>e<t?e:e>=t+A?e-A+1:t)},[A]),yt=(0,X.useCallback)(()=>{if(z!==null)return;let t=Object.entries(Ie).map(([e,t])=>(R(`tengu_config_changed`,{key:e,value:t}),`Set ${e} to ${T.bold(t)}`));d.theme!==p.current.theme&&t.push(`Set theme to ${T.bold(d.theme)}`),d.preferredNotifChannel!==p.current.preferredNotifChannel&&t.push(`Set notifications to ${T.bold(d.preferredNotifChannel)}`),g!==de.current&&t.push(`Set output style to ${T.bold(g)}`),_!==pe.current&&t.push(`Set response language to ${T.bold(_??`Default (English)`)}`),d.editorMode!==p.current.editorMode&&t.push(`Set editor mode to ${T.bold(d.editorMode||`emacs`)}`),d.diffTool!==p.current.diffTool&&t.push(`Set diff tool to ${T.bold(d.diffTool)}`),d.autoConnectIde!==p.current.autoConnectIde&&t.push(`${d.autoConnectIde?`Enabled`:`Disabled`} auto-connect to IDE`),d.autoInstallIdeExtension!==p.current.autoInstallIdeExtension&&t.push(`${d.autoInstallIdeExtension?`Enabled`:`Disabled`} auto-install IDE extension`),d.autoCompactEnabled!==p.current.autoCompactEnabled&&t.push(`${d.autoCompactEnabled?`Enabled`:`Disabled`} auto-compact`),d.respectGitignore!==p.current.respectGitignore&&t.push(`${d.respectGitignore?`Enabled`:`Disabled`} respect .gitignore in file picker`),d.copyOnSelect!==p.current.copyOnSelect&&t.push(`${d.copyOnSelect?`Enabled`:`Disabled`} copy on select`),d.terminalProgressBarEnabled!==p.current.terminalProgressBarEnabled&&t.push(`${d.terminalProgressBarEnabled?`Enabled`:`Disabled`} terminal progress bar`),d.showStatusInTerminalTab!==p.current.showStatusInTerminalTab&&t.push(`${d.showStatusInTerminalTab?`Enabled`:`Disabled`} terminal tab status`),d.showTurnDuration!==p.current.showTurnDuration&&t.push(`${d.showTurnDuration?`Enabled`:`Disabled`} turn duration`),m?.autoUpdatesChannel!==oe.current?.autoUpdatesChannel&&t.push(`Set auto-update channel to ${T.bold(m?.autoUpdatesChannel??`latest`)}`),t.length>0?e(t.join(`
|
|
3
|
-
`)):e(`Config dialog dismissed`,{display:`system`})},[z,Ie,d,j,g,_,m?.autoUpdatesChannel,$e()?m?.fastMode:void 0,e]),bt=(0,X.useCallback)(()=>{u!==He.current&&c(He.current),F(()=>p.current);let e=Re;M(`localSettings`,{spinnerTipsEnabled:e?.spinnerTipsEnabled,prefersReducedMotion:e?.prefersReducedMotion,defaultView:e?.defaultView,outputStyle:e?.outputStyle});let t=ze;M(`userSettings`,{alwaysThinkingEnabled:t?.alwaysThinkingEnabled,fastMode:t?.fastMode,promptSuggestionEnabled:t?.promptSuggestionEnabled,autoUpdatesChannel:t?.autoUpdatesChannel,minimumVersion:t?.minimumVersion,language:t?.language,syntaxHighlightingDisabled:t?.syntaxHighlightingDisabled,permissions:t?.permissions===void 0?void 0:{...t.permissions,defaultMode:t.permissions.defaultMode}});let n=Je;N(e=>({...e,mainLoopModel:n.mainLoopModel,mainLoopModelForSession:n.mainLoopModelForSession,verbose:n.verbose,thinkingEnabled:n.thinkingEnabled,fastMode:n.fastMode,promptSuggestionEnabled:n.promptSuggestionEnabled,settings:n.settings,toolPermissionContext:ce(e.toolPermissionContext)}))},[u,c,Re,ze,Je,N]);be(`confirm:no`,(0,X.useCallback)(()=>{z===null&&(L.current&&bt(),e(`Config dialog dismissed`,{display:`system`}))},[z,bt,e]),{context:`Settings`,isActive:z===null&&!D&&!o}),be(`settings:close`,yt,{context:`Settings`,isActive:z===null&&!D&&!o});let W=(0,X.useCallback)(()=>{let e=U[y];if(e?.onChange){if(e.type===`boolean`){L.current=!0,e.onChange(!e.value),e.id===`thinkingEnabled`&&(!e.value===Le.current?Ze(!1):t.messages.some(e=>e.type===`assistant`)&&Ze(!0));return}if(e.id===`theme`||e.id===`model`||e.id===`showExternalIncludesDialog`||e.id===`outputStyle`||e.id===`language`)switch(e.id){case`theme`:B(`Theme`),r(!0);return;case`model`:B(`Model`),r(!0);return;case`showExternalIncludesDialog`:B(`ExternalIncludes`),r(!0);return;case`outputStyle`:B(`OutputStyle`),r(!0);return;case`language`:B(`Language`),r(!0);return}if(e.id===`autoUpdatesChannel`){if(H){B(`EnableAutoUpdates`),r(!0);return}(m?.autoUpdatesChannel??`latest`)===`latest`?(B(`ChannelDowngrade`),r(!0)):(L.current=!0,M(`userSettings`,{autoUpdatesChannel:`latest`,minimumVersion:void 0}),h(e=>({...e,autoUpdatesChannel:`latest`,minimumVersion:void 0})),R(`tengu_autoupdate_channel_changed`,{channel:`latest`}));return}if(e.type===`enum`){L.current=!0;let t=(e.options.indexOf(e.value)+1)%e.options.length;e.onChange(e.options[t]);return}}},[H,U,y,m?.autoUpdatesChannel,r]),xt=e=>{Ze(!1);let t=Math.max(0,Math.min(U.length-1,y+e));he(t),_t(t)};return _e({"select:previous":()=>{y===0?(Ze(!1),O(!0),E(0)):xt(-1)},"select:next":()=>xt(1),"scroll:lineUp":()=>xt(-1),"scroll:lineDown":()=>xt(1),"select:accept":W,"select:previousValue":()=>W(),"select:nextValue":()=>W(),"settings:search":()=>{O(!0),it(``)}},{context:`Settings`,isActive:z===null&&!D&&!o}),(0,Z.jsx)(x,{flexDirection:`column`,width:`100%`,tabIndex:0,autoFocus:!0,onKeyDown:(0,X.useCallback)(e=>{if(z===null&&!o){if(D){if(e.key===`escape`){e.preventDefault(),V.length>0?it(``):O(!1);return}(e.key===`return`||e.key===`down`||e.key===`wheeldown`)&&(e.preventDefault(),O(!1),he(0),E(0));return}if(e.key===`left`||e.key===`right`||e.key===`tab`){e.preventDefault(),W();return}e.ctrl||e.meta||e.key===`j`||e.key===`k`||e.key===`/`||e.key.length===1&&e.key!==` `&&(e.preventDefault(),O(!0),it(e.key))}},[z,o,D,V,it,W]),children:z===`Theme`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Et,{onThemeSelect:e=>{L.current=!0,c(e),B(null),r(!1)},onCancel:()=>{B(null),r(!1)},hideEscToCancel:!0,skipExitHandling:!0}),(0,Z.jsx)(x,{children:(0,Z.jsx)(S,{dimColor:!0,italic:!0,children:(0,Z.jsxs)(C,{children:[(0,Z.jsx)(b,{shortcut:`Enter`,action:`select`}),(0,Z.jsx)(v,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]}):z===`Model`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(kt,{initial:j,onSelect:e=>{L.current=!0,pt(e),B(null),r(!1)},onCancel:()=>{B(null),r(!1)},showFastModeNotice:$e()?Ae&&et(j)&&rt():!1}),(0,Z.jsx)(S,{dimColor:!0,children:(0,Z.jsxs)(C,{children:[(0,Z.jsx)(b,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(v,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]}):z===`ExternalIncludes`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Mt,{onDone:()=>{B(null),r(!1)},externalIncludes:se(dt)}),(0,Z.jsx)(S,{dimColor:!0,children:(0,Z.jsxs)(C,{children:[(0,Z.jsx)(b,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(v,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`disable external includes`})]})})]}):z===`OutputStyle`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(sn,{initialStyle:g,onComplete:e=>{L.current=!0,le(e??`default`),B(null),r(!1),M(`localSettings`,{outputStyle:e}),R(`tengu_output_style_changed`,{style:e??`default`,source:`config_panel`,settings_source:`localSettings`})},onCancel:()=>{B(null),r(!1)}}),(0,Z.jsx)(S,{dimColor:!0,children:(0,Z.jsxs)(C,{children:[(0,Z.jsx)(b,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(v,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]}):z===`Language`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(fn,{initialLanguage:_,onComplete:e=>{L.current=!0,fe(e),B(null),r(!1),M(`userSettings`,{language:e}),R(`tengu_language_changed`,{language:e??`default`,source:`config_panel`})},onCancel:()=>{B(null),r(!1)}}),(0,Z.jsx)(S,{dimColor:!0,children:(0,Z.jsxs)(C,{children:[(0,Z.jsx)(b,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(v,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]}):z===`EnableAutoUpdates`?(0,Z.jsx)(De,{title:`Enable Auto-Updates`,onCancel:()=>{B(null),r(!1)},hideBorder:!0,hideInputGuide:!0,children:H?.type===`config`?(0,Z.jsx)(gt,{options:[{label:`Enable with latest channel`,value:`latest`},{label:`Enable with stable channel`,value:`stable`}],onChange:e=>{L.current=!0,B(null),r(!1),F(e=>({...e,autoUpdates:!0})),f({...I(),autoUpdates:!0}),M(`userSettings`,{autoUpdatesChannel:e,minimumVersion:void 0}),h(t=>({...t,autoUpdatesChannel:e,minimumVersion:void 0})),R(`tengu_autoupdate_enabled`,{channel:e})}}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(S,{children:H?.type===`env`?`Auto-updates are controlled by an environment variable and cannot be changed here.`:`Auto-updates are disabled in development builds.`}),H?.type===`env`&&(0,Z.jsxs)(S,{dimColor:!0,children:[`Unset `,H.envVar,` to re-enable auto-updates.`]})]})}):z===`ChannelDowngrade`?(0,Z.jsx)(rn,{currentVersion:`0.0.23`,onChoice:e=>{if(B(null),r(!1),e===`cancel`)return;L.current=!0;let t={autoUpdatesChannel:`stable`};e===`stay`&&(t.minimumVersion=`0.0.23`),M(`userSettings`,t),h(e=>({...e,...t})),R(`tengu_autoupdate_channel_changed`,{channel:`stable`,minimum_version_set:e===`stay`})}}):(0,Z.jsxs)(x,{flexDirection:`column`,gap:1,marginY:te?void 0:1,children:[(0,Z.jsx)(Ce,{query:V,isFocused:D&&!o,isTerminalFocused:Te,cursorOffset:at,placeholder:`Search settings…`}),(0,Z.jsx)(x,{flexDirection:`column`,children:U.length===0?(0,Z.jsxs)(S,{dimColor:!0,italic:!0,children:[`No settings match "`,V,`"`]}):(0,Z.jsxs)(Z.Fragment,{children:[w>0&&(0,Z.jsxs)(S,{dimColor:!0,children:[s.arrowUp,` `,w,` more above`]}),U.slice(w,w+A).map((e,t)=>{let n=w+t===y&&!o&&!D;return(0,Z.jsx)(Y.Fragment,{children:(0,Z.jsxs)(x,{width:`100%`,children:[(0,Z.jsx)(x,{width:44,children:(0,Z.jsxs)(S,{color:n?`suggestion`:void 0,children:[n?s.pointer:` `,` `,e.label]})}),(0,Z.jsx)(x,{flexGrow:1,children:e.type===`boolean`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(S,{color:n?`suggestion`:void 0,children:e.value.toString()}),Xe&&e.id===`thinkingEnabled`&&(0,Z.jsxs)(S,{color:`warning`,children:[` `,`Changing thinking mode mid-conversation will increase latency and may reduce quality.`]})]}):e.id===`theme`?(0,Z.jsx)(S,{color:n?`suggestion`:void 0,children:_n[e.value.toString()]??e.value.toString()}):e.id===`notifChannel`?(0,Z.jsx)(S,{color:n?`suggestion`:void 0,children:(0,Z.jsx)(gn,{value:e.value.toString()})}):e.id===`defaultPermissionMode`?(0,Z.jsx)(S,{color:n?`suggestion`:void 0,children:je(e.value)}):e.id===`autoUpdatesChannel`&&H?(0,Z.jsxs)(x,{flexDirection:`column`,children:[(0,Z.jsx)(S,{color:n?`suggestion`:void 0,children:`disabled`}),(0,Z.jsxs)(S,{dimColor:!0,children:[`(`,Ke(H),`)`]})]}):(0,Z.jsx)(S,{color:n?`suggestion`:void 0,children:e.value.toString()})})]})},e.id)}),w+A<U.length&&(0,Z.jsxs)(S,{dimColor:!0,children:[s.arrowDown,` `,U.length-w-A,` more below`]})]})}),o?(0,Z.jsx)(S,{dimColor:!0,children:(0,Z.jsxs)(C,{children:[(0,Z.jsx)(b,{shortcut:`←/→ tab`,action:`switch`}),(0,Z.jsx)(b,{shortcut:`↓`,action:`return`}),(0,Z.jsx)(v,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`close`})]})}):D?(0,Z.jsx)(S,{dimColor:!0,children:(0,Z.jsxs)(C,{children:[(0,Z.jsx)(S,{children:`Type to filter`}),(0,Z.jsx)(b,{shortcut:`Enter/↓`,action:`select`}),(0,Z.jsx)(b,{shortcut:`↑`,action:`tabs`}),(0,Z.jsx)(v,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`clear`})]})}):(0,Z.jsx)(S,{dimColor:!0,children:(0,Z.jsxs)(C,{children:[(0,Z.jsx)(v,{action:`select:accept`,context:`Settings`,fallback:`Space`,description:`change`}),(0,Z.jsx)(v,{action:`settings:close`,context:`Settings`,fallback:`Enter`,description:`save`}),(0,Z.jsx)(v,{action:`settings:search`,context:`Settings`,fallback:`/`,description:`search`}),(0,Z.jsx)(v,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]})})}function gn({value:e}){switch(e){case`auto`:return`Auto`;case`iterm2`:return(0,Z.jsxs)(S,{children:[`iTerm2 `,(0,Z.jsx)(S,{dimColor:!0,children:`(OSC 9)`})]});case`terminal_bell`:return(0,Z.jsxs)(S,{children:[`Terminal Bell `,(0,Z.jsx)(S,{dimColor:!0,children:`(\\a)`})]});case`kitty`:return(0,Z.jsxs)(S,{children:[`Kitty `,(0,Z.jsx)(S,{dimColor:!0,children:`(OSC 99)`})]});case`ghostty`:return(0,Z.jsxs)(S,{children:[`Ghostty `,(0,Z.jsx)(S,{dimColor:!0,children:`(OSC 777)`})]});case`iterm2_with_bell`:return`iTerm2 w/ Bell`;case`notifications_disabled`:return`Disabled`;default:return e}}var Y,X,Z,_n,vn=e((()=>{k(),Y=t(w(),1),X=t(w(),1),de(),o(),Je(),E(),Le(),h(),L(),Xe(),Tt(),c(),Dt(),at(),At(),jt(),an(),wt(),dn(),mn(),y(),_(),_t(),Nt(),p(),N(),le(),i(),Ft(),oe(),B(),f(),Z=A(),_n={auto:`Auto (match terminal)`,dark:`Dark mode`,light:`Light mode`,"dark-daltonized":`Dark mode (colorblind-friendly)`,"light-daltonized":`Light mode (colorblind-friendly)`,"dark-ansi":`Dark mode (ANSI colors only)`,"light-ansi":`Light mode (ANSI colors only)`}}));function yn({onClose:e,context:t,defaultTab:n}){let[r,i]=(0,Q.useState)(n),[a,o]=(0,Q.useState)(!1),[s,ee]=(0,Q.useState)(!1),te=vt(),{rows:c}=U(we()),ne=te?c+1:Math.max(15,Math.min(Math.floor(c*.8),30)),[l]=(0,Q.useState)(()=>Xt().catch(()=>[]));return pt(),be(`confirm:no`,()=>{a||e(`Status dialog dismissed`,{display:`system`})},{context:`Settings`,isActive:!a&&!(r===`Config`&&s)}),(0,$.jsx)(Ee,{color:`permission`,children:(0,$.jsx)(Te,{color:`permission`,selectedTab:r,onTabChange:i,hidden:a,initialHeaderFocused:n!==`Config`,contentHeight:a||te?void 0:ne,children:[(0,$.jsx)(O,{title:`Status`,children:(0,$.jsx)(Qt,{context:t,diagnosticsPromise:l})},`status`),(0,$.jsx)(O,{title:`Config`,children:(0,$.jsx)(Q.Suspense,{fallback:null,children:(0,$.jsx)(hn,{context:t,onClose:e,setTabsHidden:o,onIsSearchModeChange:ee,contentHeight:ne})})},`config`)]})})}var Q,$,bn=e((()=>{Q=t(w(),1),de(),mt(),oe(),_t(),k(),nn(),vn(),$=A()}));export{bn as n,yn as t};
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{l as n,n as r,o as i,t as a}from"./envUtils-DfkgIdYf.js";import{n as o,t as s}from"./figures-5ThXQEtq.js";import{Da as ee,I_ as te,Ip as c,L_ as ne,Lp as l,M_ as u,N_ as re,Oa as d,Op as f,P_ as p,Rp as ie,__ as ae,_r as m,b as h,bb as oe,g_ as g,h_ as se,j as ce,ka as le,kp as ue,mb as de,md as _,p_ as fe,pd as v,tr as pe,v_ as me,y_ as y,z_ as he,zp as ge}from"./loadAgentsDir-B0Anodo0.js";import{D as b,Gt as _e,H as ve,I as x,P as S,T as C,U as ye,Wt as be,Xn as xe,a as Se,ai as w,di as T,fi as E,j as D,k as Ce,n as O,ot as we,r as Te,t as k,x as Ee,y as De}from"./src-DL3w8VPk.js";import{t as A}from"./jsx-runtime-Bb4Xn-E0.js";import{It as j,st as Oe}from"./state-B4jiUise.js";import{n as ke,t as Ae}from"./cwd-Pa83R95t.js";import{Ft as je,Nt as Me,Pt as Ne,Rt as Pe,an as Fe,b as M,h as N,i as Ie,in as P,jt as Le,ln as Re,n as ze,s as Be,t as Ve,wn as He,xn as Ue,zt as We}from"./settings-B2jvL8Dp.js";import{_ as F,a as Ge,i as Ke,o as qe,p as Je,s as I}from"./config-C-Y2qtB2.js";import{o as L,s as Ye}from"./log-D2TIwHBV.js";import{n as Xe,r as R}from"./analytics-DJobLaWP.js";import{_ as Ze,f as z}from"./startupProfiler-CJdr3SxP.js";import{F as Qe,G as $e,H as B,K as et,N as tt,P as nt,U as rt,Yt as V,Zt as it,d as at,h as ot,m as st}from"./model-BvQFFOf8.js";import{a as ct,c as lt,f as ut,m as dt}from"./proxy-CDBfZjO7.js";import{n as ft,t as H}from"./TextInput-B8ruWRf2.js";import{n as pt,t as mt}from"./useExitOnCtrlCDWithKeybindings-BKwzUpgb.js";import{n as ht,t as gt}from"./select-DIxfl_VN.js";import{i as U,n as _t,r as vt}from"./modalContext-DDZdU1J8.js";import{g as yt,h as bt}from"./pidLock-Cm4sW35f.js";import{n as W,t as xt}from"./nativeInstaller-CdjmE9Zy.js";import{n as St,t as Ct}from"./allErrors-BF73lon8.js";import{t as wt}from"./CustomSelect-wmZ9jz0W.js";import{n as Tt,t as Et}from"./ThemePicker-BQErFFW1.js";import{i as Dt,n as Ot,r as kt,t as At}from"./extraUsage-xMuDiNKh.js";import{n as jt,t as Mt}from"./AgentsMdExternalIncludesDialog-LjI_H_Au.js";import{t as Nt}from"./SearchBox-C9xxQzh1.js";import{n as Pt,t as Ft}from"./useSearchInput-CzopttqC.js";function It(){return[]}function Lt(e,t=null,n){let r=e?.find(e=>e.name===`ide`);if(t){let e=he(t.ideType),i=te(t.ideType)?`plugin`:`extension`;if(t.error)return[{label:`IDE`,value:(0,Kt.jsxs)(S,{children:[D(`error`,n)(s.cross),` Error installing `,e,` `,i,`:`,` `,t.error,`
|
|
2
|
+
`,`Please restart your IDE and try again.`]})}];if(t.installed)return r&&r.type===`connected`?t.installedVersion===r.serverInfo?.version?[{label:`IDE`,value:`Connected to ${e} ${i} version ${t.installedVersion}`}]:[{label:`IDE`,value:`Connected to ${e} ${i} version ${t.installedVersion} (server version: ${r.serverInfo?.version})`}]:[{label:`IDE`,value:`Installed ${e} ${i}`}]}else if(r){let e=u(r)??`IDE`;return r.type===`connected`?[{label:`IDE`,value:`Connected to ${e} extension`}]:[{label:`IDE`,value:`${D(`error`,n)(s.cross)} Not connected to ${e}`}]}return[]}function Rt(e=[],t){let n=e.filter(e=>e.name!==`ide`);if(!n.length)return[];let r={connected:0,pending:0,needsAuth:0,failed:0};for(let e of n)e.type===`connected`?r.connected++:e.type===`pending`?r.pending++:e.type===`needs-auth`?r.needsAuth++:r.failed++;let i=[];return r.connected&&i.push(D(`success`,t)(`${r.connected} connected`)),r.needsAuth&&i.push(D(`warning`,t)(`${r.needsAuth} need auth`)),r.pending&&i.push(D(`inactive`,t)(`${r.pending} pending`)),r.failed&&i.push(D(`error`,t)(`${r.failed} failed`)),[{label:`MCP servers`,value:`${i.join(`, `)} ${D(`inactive`,t)(`· /mcp`)}`}]}async function zt(){let e=g(await ae()),t=[];return e.forEach(e=>{let n=Ue(e.path);t.push(`Large ${n} will impact performance (${z(e.content.length)} chars > ${z(fe)})`)}),t}function Bt(){return[{label:`Setting sources`,value:P().filter(e=>{let t=Be(e);return t!==null&&Object.keys(t).length>0}).map(e=>{if(e===`policySettings`){let e=Ie();if(e===null)return null;switch(e){case`plist`:return`Enterprise managed settings (plist)`;case`hklm`:return`Enterprise managed settings (HKLM)`;case`file`:{let{hasBase:e,hasDropIns:t}=ze();return e&&t?`Enterprise managed settings (file + drop-ins)`:t?`Enterprise managed settings (drop-ins)`:`Enterprise managed settings (file)`}case`hkcu`:return`Enterprise managed settings (HKCU)`}}return Fe(e)}).filter(e=>e!==null)}]}async function Vt(){return(await W()).map(e=>e.message)}async function Ht(){let e=await bt(),t=[],{errors:n}=Ct();if(n.length>0){let e=Array.from(new Set(n.map(e=>e.file))).join(`, `);t.push(`Found invalid settings files: ${e}. They will be ignored.`)}return e.warnings.forEach(e=>{t.push(e.issue)}),e.hasUpdatePermissions===!1&&t.push(`No write permissions for auto-updates (requires sudo)`),t}function Ut(){return[]}function Wt(){let e=V(),t=[];if(e!==`firstParty`){let n={bedrock:`AWS Bedrock`,vertex:`Google Vertex AI`,foundry:`Microsoft Foundry`,gemini:`Gemini API`,grok:`Grok API`,openai:`OpenAI API`}[e];t.push({label:`API provider`,value:n})}if(e===`firstParty`){let e=process.env.ANTHROPIC_BASE_URL;e&&t.push({label:`API base URL`,value:e})}else if(e===`bedrock`){let e=process.env.BEDROCK_BASE_URL;e&&t.push({label:`Bedrock base URL`,value:e}),t.push({label:`AWS region`,value:a()}),n(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH)&&t.push({value:`AWS auth skipped`})}else if(e===`vertex`){let e=process.env.VERTEX_BASE_URL;e&&t.push({label:`Vertex base URL`,value:e});let i=process.env.ANTHROPIC_VERTEX_PROJECT_ID;i&&t.push({label:`GCP project`,value:i}),t.push({label:`Default region`,value:r()}),n(process.env.CLAUDE_CODE_SKIP_VERTEX_AUTH)&&t.push({value:`GCP auth skipped`})}else if(e===`foundry`){let e=process.env.ANTHROPIC_FOUNDRY_BASE_URL;e&&t.push({label:`Microsoft Foundry base URL`,value:e});let r=process.env.ANTHROPIC_FOUNDRY_RESOURCE;r&&t.push({label:`Microsoft Foundry resource`,value:r}),n(process.env.CLAUDE_CODE_SKIP_FOUNDRY_AUTH)&&t.push({value:`Microsoft Foundry auth skipped`})}else if(e===`gemini`){let e=process.env.GEMINI_BASE_URL||`https://generativelanguage.googleapis.com/v1beta`;t.push({label:`Gemini base URL`,value:e})}else if(e===`grok`){let e=process.env.GROK_BASE_URL;t.push({label:`Grok base URL`,value:e})}else if(e===`openai`){let e=process.env.OPENAI_BASE_URL;t.push({label:`OpenAI base URL`,value:e})}let i=ct();i&&t.push({label:`Proxy`,value:i});let o=ut();return process.env.NODE_EXTRA_CA_CERTS&&t.push({label:`Additional CA cert(s)`,value:process.env.NODE_EXTRA_CA_CERTS}),o&&(o.cert&&process.env.CLAUDE_CODE_CLIENT_CERT&&t.push({label:`mTLS client cert`,value:process.env.CLAUDE_CODE_CLIENT_CERT}),o.key&&process.env.CLAUDE_CODE_CLIENT_KEY&&t.push({label:`mTLS client key`,value:process.env.CLAUDE_CODE_CLIENT_KEY})),t}function Gt(e){return ot(e)}var Kt,qt=e((()=>{o(),k(),y(),yt(),i(),He(),Ze(),p(),at(),it(),dt(),xt(),lt(),St(),Re(),N(),Kt=A()}));function Jt(){let e=Oe();return[{label:`Version`,value:`0.0.24`},{label:`Session name`,value:pe(e)??(0,G.jsx)(S,{dimColor:!0,children:`/rename to add a name`})},{label:`Session ID`,value:e},{label:`cwd`,value:Ae()},...Ut(),...Wt()]}function Yt({mainLoopModel:e,mcp:t,theme:n,context:r}){return[{label:`Model`,value:Gt(e)},...Lt(t.clients,r.options.ideInstallationStatus,n),...Rt(t.clients,n),...It(),...Bt()]}async function Xt(){return[...await Vt(),...await Ht(),...await zt()]}function Zt({value:e}){return Array.isArray(e)?(0,G.jsx)(x,{flexWrap:`wrap`,columnGap:1,flexShrink:99,children:e.map((t,n)=>(0,G.jsxs)(S,{children:[t,n<e.length-1?`,`:``]},n))}):typeof e==`string`?(0,G.jsx)(S,{children:e}):e}function Qt({context:e,diagnosticsPromise:t}){let n=l(e=>e.mainLoopModel),r=l(e=>e.mcp),[i]=ve(),a=en.useMemo(()=>[Jt(),Yt({mainLoopModel:n,mcp:r,theme:i,context:e})],[n,r,i,e]),o=vt()?1:void 0;return(0,G.jsxs)(x,{flexDirection:`column`,flexGrow:o,children:[(0,G.jsxs)(x,{flexDirection:`column`,gap:1,flexGrow:o,children:[a.map((e,t)=>e.length>0&&(0,G.jsx)(x,{flexDirection:`column`,children:e.map(({label:e,value:t},n)=>(0,G.jsxs)(x,{flexDirection:`row`,gap:1,flexShrink:0,children:[e!==void 0&&(0,G.jsxs)(S,{bold:!0,children:[e,`:`]}),(0,G.jsx)(Zt,{value:t})]},n))},t)),(0,G.jsx)(tn.Suspense,{fallback:null,children:(0,G.jsx)($t,{promise:t})})]}),(0,G.jsx)(S,{dimColor:!0,children:(0,G.jsx)(v,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})})]})}function $t({promise:e}){let t=(0,tn.use)(e);return t.length===0?null:(0,G.jsxs)(x,{flexDirection:`column`,paddingBottom:1,children:[(0,G.jsx)(S,{bold:!0,children:`System Diagnostics`}),t.map((e,t)=>(0,G.jsxs)(x,{flexDirection:`row`,gap:1,paddingX:1,children:[(0,G.jsx)(S,{color:`error`,children:s.warning}),typeof e==`string`?(0,G.jsx)(S,{wrap:`wrap`,children:e}):e]},t))]})}var en,tn,G,nn=e((()=>{o(),en=t(w(),1),tn=t(w(),1),j(),_t(),k(),c(),ke(),m(),qt(),_(),G=A()}));function rn({currentVersion:e,onChoice:t}){function n(e){t(e)}function r(){t(`cancel`)}return(0,K.jsxs)(De,{title:`Switch to Stable Channel`,onCancel:r,color:`permission`,hideBorder:!0,hideInputGuide:!0,children:[(0,K.jsxs)(S,{children:[`The stable channel may have an older version than what you're currently running (`,e,`).`]}),(0,K.jsx)(S,{dimColor:!0,children:`How would you like to handle this?`}),(0,K.jsx)(gt,{options:[{label:`Allow possible downgrade to stable version`,value:`downgrade`},{label:`Stay on current version (${e}) until stable catches up`,value:`stay`}],onChange:n})]})}var K,an=e((()=>{k(),wt(),K=A()}));function on(e){return Object.entries(e).map(([e,t])=>({label:t?.name??ln,value:e,description:t?.description??un}))}function sn({initialStyle:e,onComplete:t,onCancel:n,isStandaloneCommand:r}){let[i,a]=(0,cn.useState)([]),[o,s]=(0,cn.useState)(!0);(0,cn.useEffect)(()=>{d(Ae()).then(e=>{let t=on(e);a(t),s(!1)}).catch(()=>{let e=on(ee);a(e),s(!1)})},[]);let te=(0,cn.useCallback)(e=>{t(e)},[t]);return(0,q.jsx)(De,{title:`Preferred output style`,onCancel:n,hideInputGuide:!r,hideBorder:!r,children:(0,q.jsxs)(x,{flexDirection:`column`,gap:1,children:[(0,q.jsx)(x,{marginTop:1,children:(0,q.jsx)(S,{dimColor:!0,children:`This changes how Work Mate communicates with you`})}),o?(0,q.jsx)(S,{dimColor:!0,children:`Loading output styles…`}):(0,q.jsx)(gt,{options:i,onChange:te,visibleOptionCount:10,defaultValue:e})]})})}var cn,q,ln,un,dn=e((()=>{cn=t(w(),1),le(),k(),ke(),ht(),q=A(),ln=`Default`,un=`Work Mate completes coding tasks efficiently and provides concise responses`}));function fn({initialLanguage:e,onComplete:t,onCancel:n}){let[r,i]=(0,pn.useState)(e),[a,o]=(0,pn.useState)((e??``).length);be(`confirm:no`,n,{context:`Settings`});function ee(){let e=r?.trim();t(e||void 0)}return(0,J.jsxs)(x,{flexDirection:`column`,gap:1,children:[(0,J.jsx)(S,{children:`Enter your preferred response and voice language:`}),(0,J.jsxs)(x,{flexDirection:`row`,gap:1,children:[(0,J.jsx)(S,{children:s.pointer}),(0,J.jsx)(H,{value:r??``,onChange:i,onSubmit:ee,focus:!0,showCursor:!0,placeholder:`e.g., Japanese, 日本語, Español${s.ellipsis}`,columns:60,cursorOffset:a,onChangeCursorOffset:o})]}),(0,J.jsx)(S,{dimColor:!0,children:`Leave empty for default (English)`})]})}var pn,J,mn=e((()=>{o(),pn=t(w(),1),k(),de(),ft(),J=A()}));function hn({onClose:e,context:t,setTabsHidden:r,onIsSearchModeChange:i,contentHeight:a}){let{headerFocused:o,focusHeader:ee}=Se(),te=vt(),[,c]=ve(),u=ye(),[d,f]=(0,X.useState)(I()),p=Y.useRef(I()),[m,h]=(0,X.useState)(Ve()),oe=Y.useRef(Ve()),[g,le]=(0,X.useState)(m?.outputStyle||`default`),de=Y.useRef(g),[_,fe]=(0,X.useState)(m?.language),pe=Y.useRef(_),[y,he]=(0,X.useState)(0),[w,E]=(0,X.useState)(0),[D,O]=(0,X.useState)(!1),Te=xe(),{rows:k}=we(),Ee=a??Math.min(Math.floor(k*.8),30),A=Math.max(5,Ee-10),j=l(e=>e.mainLoopModel),Oe=l(e=>e.verbose),ke=l(e=>e.thinkingEnabled),Ae=l(e=>$e()?e.fastMode:!1);l(e=>e.promptSuggestionEnabled);let Fe=Ne(m?.permissions?.defaultMode??`default`),N=ge(),[Ie,P]=(0,X.useState)({}),Le=Y.useRef(ke),[Re]=(0,X.useState)(()=>Be(`localSettings`)),[ze]=(0,X.useState)(()=>Be(`userSettings`)),He=Y.useRef(u),Ue=ie(),[Je]=(0,X.useState)(()=>{let e=Ue.getState();return{mainLoopModel:e.mainLoopModel,mainLoopModelForSession:e.mainLoopModelForSession,verbose:e.verbose,thinkingEnabled:e.thinkingEnabled,fastMode:e.fastMode,promptSuggestionEnabled:e.promptSuggestionEnabled,settings:e.settings}}),L=Y.useRef(!1),[Xe,Ze]=(0,X.useState)(!1),[z,B]=(0,X.useState)(null),{query:V,setQuery:it,cursorOffset:at}=Pt({isActive:D&&z===null&&!o,onExit:()=>O(!1),onExitUp:ee,passthroughCtrlKeys:[`c`,`d`]}),ct=D&&!o;Y.useEffect(()=>{i?.(ct)},[ct,i]);let lt=re(t.options.mcpClients),ut=!n(process.env.CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING),dt=Y.use(ae(!0)),ft=me(dt),H=Ge();function pt(e){R(`tengu_config_model_changed`,{from_model:j,to_model:e}),N(t=>({...t,mainLoopModel:e,mainLoopModelForSession:null})),P(t=>{let n=ot(e)+(Ot(e,!1,st())?` · Billed as extra usage`:``);if(`model`in t){let{model:e,...r}=t;return{...r,model:n}}return{...t,model:n}})}function mt(e){F(t=>({...t,verbose:e})),f({...I(),verbose:e}),N(t=>({...t,verbose:e})),P(t=>{if(`verbose`in t){let{verbose:e,...n}=t;return n}return{...t,verbose:e}})}let ht=[{id:`autoCompactEnabled`,label:`Auto-compact`,value:d.autoCompactEnabled,type:`boolean`,onChange(e){F(t=>({...t,autoCompactEnabled:e})),f({...I(),autoCompactEnabled:e}),R(`tengu_auto_compact_setting_changed`,{enabled:e})}},{id:`spinnerTipsEnabled`,label:`Show tips`,value:m?.spinnerTipsEnabled??!0,type:`boolean`,onChange(e){M(`localSettings`,{spinnerTipsEnabled:e}),h(t=>({...t,spinnerTipsEnabled:e})),R(`tengu_tips_setting_changed`,{enabled:e})}},{id:`cacheWarningEnabled`,label:`Cache warnings`,value:m?.cacheWarningEnabled??!0,type:`boolean`,onChange(e){M(`localSettings`,{cacheWarningEnabled:e}),h(t=>({...t,cacheWarningEnabled:e})),R(`tengu_cache_warning_setting_changed`,{enabled:e})}},{id:`prefersReducedMotion`,label:`Reduce motion`,value:m?.prefersReducedMotion??!1,type:`boolean`,onChange(e){M(`localSettings`,{prefersReducedMotion:e}),h(t=>({...t,prefersReducedMotion:e})),N(t=>({...t,settings:{...t.settings,prefersReducedMotion:e}})),R(`tengu_reduce_motion_setting_changed`,{enabled:e})}},{id:`thinkingEnabled`,label:`Thinking mode`,value:ke??!0,type:`boolean`,onChange(e){N(t=>({...t,thinkingEnabled:e})),M(`userSettings`,{alwaysThinkingEnabled:e?void 0:!1}),R(`tengu_thinking_toggled`,{enabled:e})}},...$e()&&rt()?[{id:`fastMode`,label:`Fast mode (${tt} only)`,value:!!Ae,type:`boolean`,onChange(e){nt(),M(`userSettings`,{fastMode:e?!0:void 0}),e?(N(e=>({...e,mainLoopModel:Qe(),mainLoopModelForSession:null,fastMode:!0})),P(e=>({...e,model:Qe(),"Fast mode":`ON`}))):(N(e=>({...e,fastMode:!1})),P(e=>({...e,"Fast mode":`OFF`})))}}]:[],...ut?[{id:`fileCheckpointingEnabled`,label:`Rewind code (checkpoints)`,value:d.fileCheckpointingEnabled,type:`boolean`,onChange(e){F(t=>({...t,fileCheckpointingEnabled:e})),f({...I(),fileCheckpointingEnabled:e}),R(`tengu_file_history_snapshots_setting_changed`,{enabled:e})}}]:[],{id:`verbose`,label:`Verbose output`,value:Oe,type:`boolean`,onChange:mt},{id:`terminalProgressBarEnabled`,label:`Terminal progress bar`,value:d.terminalProgressBarEnabled,type:`boolean`,onChange(e){F(t=>({...t,terminalProgressBarEnabled:e})),f({...I(),terminalProgressBarEnabled:e}),R(`tengu_terminal_progress_bar_setting_changed`,{enabled:e})}},{id:`showTurnDuration`,label:`Show turn duration`,value:d.showTurnDuration,type:`boolean`,onChange(e){F(t=>({...t,showTurnDuration:e})),f({...I(),showTurnDuration:e}),R(`tengu_show_turn_duration_setting_changed`,{enabled:e})}},{id:`defaultPermissionMode`,label:`Default permission mode`,value:Fe,options:(()=>{let e=[`default`,`plan`];return[...e,...We.filter(t=>!e.includes(t))]})(),type:`enum`,onChange(e){let t=Ne(e),n=t===`auto`?t:Me(t)?Pe(t):t,r=M(`userSettings`,{permissions:{...m?.permissions,defaultMode:n}});if(r.error){Ye(r.error);return}h(e=>({...e,permissions:{...e?.permissions,defaultMode:n}})),P(t=>({...t,defaultPermissionMode:e})),R(`tengu_config_changed`,{setting:`defaultPermissionMode`,value:e})}},{id:`respectGitignore`,label:`Respect .gitignore in file picker`,value:d.respectGitignore,type:`boolean`,onChange(e){F(t=>({...t,respectGitignore:e})),f({...I(),respectGitignore:e}),R(`tengu_respect_gitignore_setting_changed`,{enabled:e})}},...ue()?[{id:`copyOnSelect`,label:`Copy on select`,value:d.copyOnSelect??!0,type:`boolean`,onChange(e){F(t=>({...t,copyOnSelect:e})),f({...I(),copyOnSelect:e}),R(`tengu_config_changed`,{setting:`copyOnSelect`,value:String(e)})}}]:[],H?{id:`autoUpdatesChannel`,label:`Auto-update channel`,value:`disabled`,type:`managedEnum`,onChange(){}}:{id:`autoUpdatesChannel`,label:`Auto-update channel`,value:m?.autoUpdatesChannel??`latest`,type:`managedEnum`,onChange(){}},{id:`theme`,label:`Theme`,value:u,type:`managedEnum`,onChange:c},{id:`notifChannel`,label:`Notifications`,value:d.preferredNotifChannel,options:[`auto`,`iterm2`,`terminal_bell`,`iterm2_with_bell`,`kitty`,`ghostty`,`notifications_disabled`],type:`enum`,onChange(e){F(t=>({...t,preferredNotifChannel:e})),f({...I(),preferredNotifChannel:e})}},{id:`outputStyle`,label:`Output style`,value:g,type:`managedEnum`,onChange:()=>{}},{id:`language`,label:`Language`,value:_??`Default (English)`,type:`managedEnum`,onChange:()=>{}},{id:`editorMode`,label:`Editor mode`,value:d.editorMode===`emacs`?`normal`:d.editorMode||`normal`,options:[`normal`,`vim`],type:`enum`,onChange(e){F(t=>({...t,editorMode:e})),f({...I(),editorMode:e}),R(`tengu_editor_mode_changed`,{mode:e,source:`config_panel`})}},{id:`prStatusFooterEnabled`,label:`Show PR status footer`,value:d.prStatusFooterEnabled??!0,type:`boolean`,onChange(e){F(t=>t.prStatusFooterEnabled===e?t:{...t,prStatusFooterEnabled:e}),f({...I(),prStatusFooterEnabled:e}),R(`tengu_pr_status_footer_setting_changed`,{enabled:e})}},{id:`model`,label:`Model`,value:j===null?`Default (recommended)`:j,type:`managedEnum`,onChange:pt},...lt?[{id:`diffTool`,label:`Diff tool`,value:d.diffTool??`auto`,options:[`terminal`,`auto`],type:`enum`,onChange(e){F(t=>({...t,diffTool:e})),f({...I(),diffTool:e}),R(`tengu_diff_tool_changed`,{tool:e,source:`config_panel`})}}]:[],...ne()?[]:[{id:`autoConnectIde`,label:`Auto-connect to IDE (external terminal)`,value:d.autoConnectIde??!1,type:`boolean`,onChange(e){F(t=>({...t,autoConnectIde:e})),f({...I(),autoConnectIde:e}),R(`tengu_auto_connect_ide_changed`,{enabled:e,source:`config_panel`})}}],...ne()?[{id:`autoInstallIdeExtension`,label:`Auto-install IDE extension`,value:d.autoInstallIdeExtension??!0,type:`boolean`,onChange(e){F(t=>({...t,autoInstallIdeExtension:e})),f({...I(),autoInstallIdeExtension:e}),R(`tengu_auto_install_ide_extension_changed`,{enabled:e,source:`config_panel`})}}]:[],...ft?[{id:`showExternalIncludesDialog`,label:`External AGENTS.md includes`,value:qe().hasAgentsMdExternalIncludesApproved?`true`:`false`,type:`managedEnum`,onChange(){}}]:[]],U=Y.useMemo(()=>{if(!V)return ht;let e=V.toLowerCase();return ht.filter(t=>t.id.toLowerCase().includes(e)?!0:(`searchText`in t?t.searchText:t.label).toLowerCase().includes(e))},[ht,V]);Y.useEffect(()=>{if(y>=U.length){let e=Math.max(0,U.length-1);he(e),E(Math.max(0,e-A+1));return}E(e=>y<e?y:y>=e+A?y-A+1:e)},[U.length,y,A]);let _t=(0,X.useCallback)(e=>{E(t=>e<t?e:e>=t+A?e-A+1:t)},[A]),yt=(0,X.useCallback)(()=>{if(z!==null)return;let t=Object.entries(Ie).map(([e,t])=>(R(`tengu_config_changed`,{key:e,value:t}),`Set ${e} to ${T.bold(t)}`));d.theme!==p.current.theme&&t.push(`Set theme to ${T.bold(d.theme)}`),d.preferredNotifChannel!==p.current.preferredNotifChannel&&t.push(`Set notifications to ${T.bold(d.preferredNotifChannel)}`),g!==de.current&&t.push(`Set output style to ${T.bold(g)}`),_!==pe.current&&t.push(`Set response language to ${T.bold(_??`Default (English)`)}`),d.editorMode!==p.current.editorMode&&t.push(`Set editor mode to ${T.bold(d.editorMode||`emacs`)}`),d.diffTool!==p.current.diffTool&&t.push(`Set diff tool to ${T.bold(d.diffTool)}`),d.autoConnectIde!==p.current.autoConnectIde&&t.push(`${d.autoConnectIde?`Enabled`:`Disabled`} auto-connect to IDE`),d.autoInstallIdeExtension!==p.current.autoInstallIdeExtension&&t.push(`${d.autoInstallIdeExtension?`Enabled`:`Disabled`} auto-install IDE extension`),d.autoCompactEnabled!==p.current.autoCompactEnabled&&t.push(`${d.autoCompactEnabled?`Enabled`:`Disabled`} auto-compact`),d.respectGitignore!==p.current.respectGitignore&&t.push(`${d.respectGitignore?`Enabled`:`Disabled`} respect .gitignore in file picker`),d.copyOnSelect!==p.current.copyOnSelect&&t.push(`${d.copyOnSelect?`Enabled`:`Disabled`} copy on select`),d.terminalProgressBarEnabled!==p.current.terminalProgressBarEnabled&&t.push(`${d.terminalProgressBarEnabled?`Enabled`:`Disabled`} terminal progress bar`),d.showStatusInTerminalTab!==p.current.showStatusInTerminalTab&&t.push(`${d.showStatusInTerminalTab?`Enabled`:`Disabled`} terminal tab status`),d.showTurnDuration!==p.current.showTurnDuration&&t.push(`${d.showTurnDuration?`Enabled`:`Disabled`} turn duration`),m?.autoUpdatesChannel!==oe.current?.autoUpdatesChannel&&t.push(`Set auto-update channel to ${T.bold(m?.autoUpdatesChannel??`latest`)}`),t.length>0?e(t.join(`
|
|
3
|
+
`)):e(`Config dialog dismissed`,{display:`system`})},[z,Ie,d,j,g,_,m?.autoUpdatesChannel,$e()?m?.fastMode:void 0,e]),bt=(0,X.useCallback)(()=>{u!==He.current&&c(He.current),F(()=>p.current);let e=Re;M(`localSettings`,{spinnerTipsEnabled:e?.spinnerTipsEnabled,prefersReducedMotion:e?.prefersReducedMotion,defaultView:e?.defaultView,outputStyle:e?.outputStyle});let t=ze;M(`userSettings`,{alwaysThinkingEnabled:t?.alwaysThinkingEnabled,fastMode:t?.fastMode,promptSuggestionEnabled:t?.promptSuggestionEnabled,autoUpdatesChannel:t?.autoUpdatesChannel,minimumVersion:t?.minimumVersion,language:t?.language,syntaxHighlightingDisabled:t?.syntaxHighlightingDisabled,permissions:t?.permissions===void 0?void 0:{...t.permissions,defaultMode:t.permissions.defaultMode}});let n=Je;N(e=>({...e,mainLoopModel:n.mainLoopModel,mainLoopModelForSession:n.mainLoopModelForSession,verbose:n.verbose,thinkingEnabled:n.thinkingEnabled,fastMode:n.fastMode,promptSuggestionEnabled:n.promptSuggestionEnabled,settings:n.settings,toolPermissionContext:ce(e.toolPermissionContext)}))},[u,c,Re,ze,Je,N]);be(`confirm:no`,(0,X.useCallback)(()=>{z===null&&(L.current&&bt(),e(`Config dialog dismissed`,{display:`system`}))},[z,bt,e]),{context:`Settings`,isActive:z===null&&!D&&!o}),be(`settings:close`,yt,{context:`Settings`,isActive:z===null&&!D&&!o});let W=(0,X.useCallback)(()=>{let e=U[y];if(e?.onChange){if(e.type===`boolean`){L.current=!0,e.onChange(!e.value),e.id===`thinkingEnabled`&&(!e.value===Le.current?Ze(!1):t.messages.some(e=>e.type===`assistant`)&&Ze(!0));return}if(e.id===`theme`||e.id===`model`||e.id===`showExternalIncludesDialog`||e.id===`outputStyle`||e.id===`language`)switch(e.id){case`theme`:B(`Theme`),r(!0);return;case`model`:B(`Model`),r(!0);return;case`showExternalIncludesDialog`:B(`ExternalIncludes`),r(!0);return;case`outputStyle`:B(`OutputStyle`),r(!0);return;case`language`:B(`Language`),r(!0);return}if(e.id===`autoUpdatesChannel`){if(H){B(`EnableAutoUpdates`),r(!0);return}(m?.autoUpdatesChannel??`latest`)===`latest`?(B(`ChannelDowngrade`),r(!0)):(L.current=!0,M(`userSettings`,{autoUpdatesChannel:`latest`,minimumVersion:void 0}),h(e=>({...e,autoUpdatesChannel:`latest`,minimumVersion:void 0})),R(`tengu_autoupdate_channel_changed`,{channel:`latest`}));return}if(e.type===`enum`){L.current=!0;let t=(e.options.indexOf(e.value)+1)%e.options.length;e.onChange(e.options[t]);return}}},[H,U,y,m?.autoUpdatesChannel,r]),xt=e=>{Ze(!1);let t=Math.max(0,Math.min(U.length-1,y+e));he(t),_t(t)};return _e({"select:previous":()=>{y===0?(Ze(!1),O(!0),E(0)):xt(-1)},"select:next":()=>xt(1),"scroll:lineUp":()=>xt(-1),"scroll:lineDown":()=>xt(1),"select:accept":W,"select:previousValue":()=>W(),"select:nextValue":()=>W(),"settings:search":()=>{O(!0),it(``)}},{context:`Settings`,isActive:z===null&&!D&&!o}),(0,Z.jsx)(x,{flexDirection:`column`,width:`100%`,tabIndex:0,autoFocus:!0,onKeyDown:(0,X.useCallback)(e=>{if(z===null&&!o){if(D){if(e.key===`escape`){e.preventDefault(),V.length>0?it(``):O(!1);return}(e.key===`return`||e.key===`down`||e.key===`wheeldown`)&&(e.preventDefault(),O(!1),he(0),E(0));return}if(e.key===`left`||e.key===`right`||e.key===`tab`){e.preventDefault(),W();return}e.ctrl||e.meta||e.key===`j`||e.key===`k`||e.key===`/`||e.key.length===1&&e.key!==` `&&(e.preventDefault(),O(!0),it(e.key))}},[z,o,D,V,it,W]),children:z===`Theme`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Et,{onThemeSelect:e=>{L.current=!0,c(e),B(null),r(!1)},onCancel:()=>{B(null),r(!1)},hideEscToCancel:!0,skipExitHandling:!0}),(0,Z.jsx)(x,{children:(0,Z.jsx)(S,{dimColor:!0,italic:!0,children:(0,Z.jsxs)(C,{children:[(0,Z.jsx)(b,{shortcut:`Enter`,action:`select`}),(0,Z.jsx)(v,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]}):z===`Model`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(kt,{initial:j,onSelect:e=>{L.current=!0,pt(e),B(null),r(!1)},onCancel:()=>{B(null),r(!1)},showFastModeNotice:$e()?Ae&&et(j)&&rt():!1}),(0,Z.jsx)(S,{dimColor:!0,children:(0,Z.jsxs)(C,{children:[(0,Z.jsx)(b,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(v,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]}):z===`ExternalIncludes`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Mt,{onDone:()=>{B(null),r(!1)},externalIncludes:se(dt)}),(0,Z.jsx)(S,{dimColor:!0,children:(0,Z.jsxs)(C,{children:[(0,Z.jsx)(b,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(v,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`disable external includes`})]})})]}):z===`OutputStyle`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(sn,{initialStyle:g,onComplete:e=>{L.current=!0,le(e??`default`),B(null),r(!1),M(`localSettings`,{outputStyle:e}),R(`tengu_output_style_changed`,{style:e??`default`,source:`config_panel`,settings_source:`localSettings`})},onCancel:()=>{B(null),r(!1)}}),(0,Z.jsx)(S,{dimColor:!0,children:(0,Z.jsxs)(C,{children:[(0,Z.jsx)(b,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(v,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]}):z===`Language`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(fn,{initialLanguage:_,onComplete:e=>{L.current=!0,fe(e),B(null),r(!1),M(`userSettings`,{language:e}),R(`tengu_language_changed`,{language:e??`default`,source:`config_panel`})},onCancel:()=>{B(null),r(!1)}}),(0,Z.jsx)(S,{dimColor:!0,children:(0,Z.jsxs)(C,{children:[(0,Z.jsx)(b,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(v,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]}):z===`EnableAutoUpdates`?(0,Z.jsx)(De,{title:`Enable Auto-Updates`,onCancel:()=>{B(null),r(!1)},hideBorder:!0,hideInputGuide:!0,children:H?.type===`config`?(0,Z.jsx)(gt,{options:[{label:`Enable with latest channel`,value:`latest`},{label:`Enable with stable channel`,value:`stable`}],onChange:e=>{L.current=!0,B(null),r(!1),F(e=>({...e,autoUpdates:!0})),f({...I(),autoUpdates:!0}),M(`userSettings`,{autoUpdatesChannel:e,minimumVersion:void 0}),h(t=>({...t,autoUpdatesChannel:e,minimumVersion:void 0})),R(`tengu_autoupdate_enabled`,{channel:e})}}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(S,{children:H?.type===`env`?`Auto-updates are controlled by an environment variable and cannot be changed here.`:`Auto-updates are disabled in development builds.`}),H?.type===`env`&&(0,Z.jsxs)(S,{dimColor:!0,children:[`Unset `,H.envVar,` to re-enable auto-updates.`]})]})}):z===`ChannelDowngrade`?(0,Z.jsx)(rn,{currentVersion:`0.0.24`,onChoice:e=>{if(B(null),r(!1),e===`cancel`)return;L.current=!0;let t={autoUpdatesChannel:`stable`};e===`stay`&&(t.minimumVersion=`0.0.24`),M(`userSettings`,t),h(e=>({...e,...t})),R(`tengu_autoupdate_channel_changed`,{channel:`stable`,minimum_version_set:e===`stay`})}}):(0,Z.jsxs)(x,{flexDirection:`column`,gap:1,marginY:te?void 0:1,children:[(0,Z.jsx)(Ce,{query:V,isFocused:D&&!o,isTerminalFocused:Te,cursorOffset:at,placeholder:`Search settings…`}),(0,Z.jsx)(x,{flexDirection:`column`,children:U.length===0?(0,Z.jsxs)(S,{dimColor:!0,italic:!0,children:[`No settings match "`,V,`"`]}):(0,Z.jsxs)(Z.Fragment,{children:[w>0&&(0,Z.jsxs)(S,{dimColor:!0,children:[s.arrowUp,` `,w,` more above`]}),U.slice(w,w+A).map((e,t)=>{let n=w+t===y&&!o&&!D;return(0,Z.jsx)(Y.Fragment,{children:(0,Z.jsxs)(x,{width:`100%`,children:[(0,Z.jsx)(x,{width:44,children:(0,Z.jsxs)(S,{color:n?`suggestion`:void 0,children:[n?s.pointer:` `,` `,e.label]})}),(0,Z.jsx)(x,{flexGrow:1,children:e.type===`boolean`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(S,{color:n?`suggestion`:void 0,children:e.value.toString()}),Xe&&e.id===`thinkingEnabled`&&(0,Z.jsxs)(S,{color:`warning`,children:[` `,`Changing thinking mode mid-conversation will increase latency and may reduce quality.`]})]}):e.id===`theme`?(0,Z.jsx)(S,{color:n?`suggestion`:void 0,children:_n[e.value.toString()]??e.value.toString()}):e.id===`notifChannel`?(0,Z.jsx)(S,{color:n?`suggestion`:void 0,children:(0,Z.jsx)(gn,{value:e.value.toString()})}):e.id===`defaultPermissionMode`?(0,Z.jsx)(S,{color:n?`suggestion`:void 0,children:je(e.value)}):e.id===`autoUpdatesChannel`&&H?(0,Z.jsxs)(x,{flexDirection:`column`,children:[(0,Z.jsx)(S,{color:n?`suggestion`:void 0,children:`disabled`}),(0,Z.jsxs)(S,{dimColor:!0,children:[`(`,Ke(H),`)`]})]}):(0,Z.jsx)(S,{color:n?`suggestion`:void 0,children:e.value.toString()})})]})},e.id)}),w+A<U.length&&(0,Z.jsxs)(S,{dimColor:!0,children:[s.arrowDown,` `,U.length-w-A,` more below`]})]})}),o?(0,Z.jsx)(S,{dimColor:!0,children:(0,Z.jsxs)(C,{children:[(0,Z.jsx)(b,{shortcut:`←/→ tab`,action:`switch`}),(0,Z.jsx)(b,{shortcut:`↓`,action:`return`}),(0,Z.jsx)(v,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`close`})]})}):D?(0,Z.jsx)(S,{dimColor:!0,children:(0,Z.jsxs)(C,{children:[(0,Z.jsx)(S,{children:`Type to filter`}),(0,Z.jsx)(b,{shortcut:`Enter/↓`,action:`select`}),(0,Z.jsx)(b,{shortcut:`↑`,action:`tabs`}),(0,Z.jsx)(v,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`clear`})]})}):(0,Z.jsx)(S,{dimColor:!0,children:(0,Z.jsxs)(C,{children:[(0,Z.jsx)(v,{action:`select:accept`,context:`Settings`,fallback:`Space`,description:`change`}),(0,Z.jsx)(v,{action:`settings:close`,context:`Settings`,fallback:`Enter`,description:`save`}),(0,Z.jsx)(v,{action:`settings:search`,context:`Settings`,fallback:`/`,description:`search`}),(0,Z.jsx)(v,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]})})}function gn({value:e}){switch(e){case`auto`:return`Auto`;case`iterm2`:return(0,Z.jsxs)(S,{children:[`iTerm2 `,(0,Z.jsx)(S,{dimColor:!0,children:`(OSC 9)`})]});case`terminal_bell`:return(0,Z.jsxs)(S,{children:[`Terminal Bell `,(0,Z.jsx)(S,{dimColor:!0,children:`(\\a)`})]});case`kitty`:return(0,Z.jsxs)(S,{children:[`Kitty `,(0,Z.jsx)(S,{dimColor:!0,children:`(OSC 99)`})]});case`ghostty`:return(0,Z.jsxs)(S,{children:[`Ghostty `,(0,Z.jsx)(S,{dimColor:!0,children:`(OSC 777)`})]});case`iterm2_with_bell`:return`iTerm2 w/ Bell`;case`notifications_disabled`:return`Disabled`;default:return e}}var Y,X,Z,_n,vn=e((()=>{k(),Y=t(w(),1),X=t(w(),1),de(),o(),Je(),E(),Le(),h(),L(),Xe(),Tt(),c(),Dt(),at(),At(),jt(),an(),wt(),dn(),mn(),y(),_(),_t(),Nt(),p(),N(),le(),i(),Ft(),oe(),B(),f(),Z=A(),_n={auto:`Auto (match terminal)`,dark:`Dark mode`,light:`Light mode`,"dark-daltonized":`Dark mode (colorblind-friendly)`,"light-daltonized":`Light mode (colorblind-friendly)`,"dark-ansi":`Dark mode (ANSI colors only)`,"light-ansi":`Light mode (ANSI colors only)`}}));function yn({onClose:e,context:t,defaultTab:n}){let[r,i]=(0,Q.useState)(n),[a,o]=(0,Q.useState)(!1),[s,ee]=(0,Q.useState)(!1),te=vt(),{rows:c}=U(we()),ne=te?c+1:Math.max(15,Math.min(Math.floor(c*.8),30)),[l]=(0,Q.useState)(()=>Xt().catch(()=>[]));return pt(),be(`confirm:no`,()=>{a||e(`Status dialog dismissed`,{display:`system`})},{context:`Settings`,isActive:!a&&!(r===`Config`&&s)}),(0,$.jsx)(Ee,{color:`permission`,children:(0,$.jsx)(Te,{color:`permission`,selectedTab:r,onTabChange:i,hidden:a,initialHeaderFocused:n!==`Config`,contentHeight:a||te?void 0:ne,children:[(0,$.jsx)(O,{title:`Status`,children:(0,$.jsx)(Qt,{context:t,diagnosticsPromise:l})},`status`),(0,$.jsx)(O,{title:`Config`,children:(0,$.jsx)(Q.Suspense,{fallback:null,children:(0,$.jsx)(hn,{context:t,onClose:e,setTabsHidden:o,onIsSearchModeChange:ee,contentHeight:ne})})},`config`)]})})}var Q,$,bn=e((()=>{Q=t(w(),1),de(),mt(),oe(),_t(),k(),nn(),vn(),$=A()}));export{bn as n,yn as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./defineProperty-C-QyHrDq.js";import{a as i,c as a,i as o,n as s,o as c,r as l,s as u,t as d}from"./classPrivateFieldSet2-D4U5K-I3.js";import{n as f,t as p}from"./classPrivateMethodInitSpec-BXQD0Vh4.js";import{n as m,t as h}from"./figures-5ThXQEtq.js";import{AC as g,Gy as _,Ip as v,Jy as y,Ky as b,Lp as ee,Mp as x,Np as te,Xy as S,Yy as C,Zy as ne,bb as w,fs as re,jC as ie,nb as ae,ps as oe,qy as T,rb as se,zp as ce}from"./loadAgentsDir-DlPbtIsS.js";import{Gr as E,H as le,I as D,P as O,T as ue,ai as k,mt as de,ot as fe,t as A}from"./src-DL3w8VPk.js";import{t as j}from"./jsx-runtime-Bb4Xn-E0.js";import{It as M,Jn as pe,m as me,qn as he}from"./state-B4jiUise.js";import{Hn as ge,Vn as N,h as _e,t as P}from"./settings-B2jvL8Dp.js";import{p as ve,s as ye}from"./config-C-Y2qtB2.js";import{n as be,o as xe}from"./intl-D2kgJmX7.js";import{S as Se,_ as Ce,f as we,l as Te}from"./startupProfiler-CJdr3SxP.js";import{o as Ee}from"./TextInput-CD9iau2k.js";import{a as De,c as Oe,l as ke,n as Ae,o as je,r as Me,s as Ne,t as Pe,u as Fe}from"./SpinnerGlyph-CmkRUvHe.js";import{watch as Ie}from"fs";var Le,Re,ze=e((()=>{M(),n(),Le=class e{constructor(e){r(this,`activeOperations`,new Set),r(this,`lastUserActivityTime`,0),r(this,`lastCLIRecordedTime`,void 0),r(this,`isCLIActive`,!1),r(this,`USER_ACTIVITY_TIMEOUT_MS`,5e3),r(this,`getNow`,void 0),r(this,`getActiveTimeCounter`,void 0),this.getNow=e?.getNow??(()=>Date.now()),this.getActiveTimeCounter=e?.getActiveTimeCounter??me,this.lastCLIRecordedTime=this.getNow()}static getInstance(){return e.instance||(e.instance=new e),e.instance}static resetInstance(){e.instance=null}static createInstance(t){return e.instance=new e(t),e.instance}recordUserActivity(){if(!this.isCLIActive&&this.lastUserActivityTime!==0){let e=(this.getNow()-this.lastUserActivityTime)/1e3;if(e>0){let t=this.getActiveTimeCounter();t&&e<this.USER_ACTIVITY_TIMEOUT_MS/1e3&&t.add(e,{type:`user`})}}this.lastUserActivityTime=this.getNow()}startCLIActivity(e){this.activeOperations.has(e)&&this.endCLIActivity(e);let t=this.activeOperations.size===0;this.activeOperations.add(e),t&&(this.isCLIActive=!0,this.lastCLIRecordedTime=this.getNow())}endCLIActivity(e){if(this.activeOperations.delete(e),this.activeOperations.size===0){let e=this.getNow(),t=(e-this.lastCLIRecordedTime)/1e3;if(t>0){let e=this.getActiveTimeCounter();e&&e.add(t,{type:`cli`})}this.lastCLIRecordedTime=e,this.isCLIActive=!1}}async trackOperation(e,t){this.startCLIActivity(e);try{return await t()}finally{this.endCLIActivity(e)}}getActivityStates(){return{isUserActive:(this.getNow()-this.lastUserActivityTime)/1e3<this.USER_ACTIVITY_TIMEOUT_MS/1e3,isCLIActive:this.isCLIActive,activeOperationCount:this.activeOperations.size}}},r(Le,`instance`,null),Re=Le.getInstance()}));function Be(){let e=P().spinnerVerbs;return e?e.mode===`replace`?e.verbs.length>0?e.verbs:Ve:[...Ve,...e.verbs]:Ve}var Ve,He=e((()=>{_e(),Ve=`Accomplishing.Actioning.Actualizing.Architecting.Baking.Beaming.Beboppin'.Befuddling.Billowing.Blanching.Bloviating.Boogieing.Boondoggling.Booping.Bootstrapping.Brewing.Bunning.Burrowing.Calculating.Canoodling.Caramelizing.Cascading.Catapulting.Cerebrating.Channeling.Channelling.Choreographing.Churning.Clauding.Coalescing.Cogitating.Combobulating.Composing.Computing.Concocting.Considering.Contemplating.Cooking.Crafting.Creating.Crunching.Crystallizing.Cultivating.Deciphering.Deliberating.Determining.Dilly-dallying.Discombobulating.Doing.Doodling.Drizzling.Ebbing.Effecting.Elucidating.Embellishing.Enchanting.Envisioning.Evaporating.Fermenting.Fiddle-faddling.Finagling.Flambéing.Flibbertigibbeting.Flowing.Flummoxing.Fluttering.Forging.Forming.Frolicking.Frosting.Gallivanting.Galloping.Garnishing.Generating.Gesticulating.Germinating.Gitifying.Grooving.Gusting.Harmonizing.Hashing.Hatching.Herding.Honking.Hullaballooing.Hyperspacing.Ideating.Imagining.Improvising.Incubating.Inferring.Infusing.Ionizing.Jitterbugging.Julienning.Kneading.Leavening.Levitating.Lollygagging.Manifesting.Marinating.Meandering.Metamorphosing.Misting.Moonwalking.Moseying.Mulling.Mustering.Musing.Nebulizing.Nesting.Newspapering.Noodling.Nucleating.Orbiting.Orchestrating.Osmosing.Perambulating.Percolating.Perusing.Philosophising.Photosynthesizing.Pollinating.Pondering.Pontificating.Pouncing.Precipitating.Prestidigitating.Processing.Proofing.Propagating.Puttering.Puzzling.Quantumizing.Razzle-dazzling.Razzmatazzing.Recombobulating.Reticulating.Roosting.Ruminating.Sautéing.Scampering.Schlepping.Scurrying.Seasoning.Shenaniganing.Shimmying.Simmering.Skedaddling.Sketching.Slithering.Smooshing.Sock-hopping.Spelunking.Spinning.Sprouting.Stewing.Sublimating.Swirling.Swooping.Symbioting.Synthesizing.Tempering.Thinking.Thundering.Tinkering.Tomfoolering.Topsy-turvying.Transfiguring.Transmuting.Twisting.Undulating.Unfurling.Unravelling.Vibing.Waddling.Wandering.Warping.Whatchamacalliting.Whirlpooling.Whirring.Whisking.Wibbling.Working.Wrangling.Zesting.Zigzagging`.split(`.`)}));function F(e,t){let n=parseInt(e.id,10),r=parseInt(t.id,10);return!isNaN(n)&&!isNaN(r)?n-r:e.id.localeCompare(t.id)}function Ue({tasks:e,isStandalone:t=!1}){let[,n]=I.useState(0),{rows:r,columns:i}=fe(),a=I.useRef(new Map),o=I.useRef(null);o.current===null&&(o.current=new Set(e.filter(e=>e.status===`completed`).map(e=>e.id)));let s=r<=10?0:Math.min(10,Math.max(3,r-14)),c=new Set(e.filter(e=>e.status===`completed`).map(e=>e.id)),l=Date.now();for(let e of c)o.current.has(e)||a.current.set(e,l);for(let e of a.current.keys())c.has(e)||a.current.delete(e);if(o.current=c,I.useEffect(()=>{if(a.current.size===0)return;let e=Date.now(),t=1/0;for(let n of a.current.values()){let r=n+Ke;r>e&&r<t&&(t=r)}if(t===1/0)return;let r=setTimeout(e=>e(e=>e+1),t-e,n);return()=>clearTimeout(r)},[e]),!y()||e.length===0)return null;let u=N(e,e=>e.status===`completed`),d=N(e,e=>e.status===`pending`),f=e.length-u-d,p=new Set(e.filter(e=>e.status!==`completed`).map(e=>e.id)),m=e.length>s,h,g;if(m){let t=[],n=[];for(let r of e.filter(e=>e.status===`completed`)){let e=a.current.get(r.id);e&&l-e<Ke?t.push(r):n.push(r)}t.sort(F),n.sort(F);let r=e.filter(e=>e.status===`in_progress`).sort(F),i=e.filter(e=>e.status===`pending`).sort((e,t)=>{let n=e.blockedBy.some(e=>p.has(e));return n===t.blockedBy.some(e=>p.has(e))?F(e,t):n?1:-1}),o=[...t,...r,...i,...n];h=o.slice(0,s),g=o.slice(s)}else h=[...e].sort(F),g=[];let _=``;if(g.length>0){let e=[],t=N(g,e=>e.status===`pending`),n=N(g,e=>e.status===`in_progress`),r=N(g,e=>e.status===`completed`);n>0&&e.push(`${n} in progress`),t>0&&e.push(`${t} pending`),r>0&&e.push(`${r} completed`),_=` … +${e.join(`, `)}`}let v=(0,L.jsxs)(L.Fragment,{children:[h.map(e=>(0,L.jsx)(Ge,{task:e,openBlockers:e.blockedBy.filter(e=>p.has(e)),columns:i},e.id)),s>0&&_&&(0,L.jsx)(O,{dimColor:!0,children:_})]});return t?(0,L.jsxs)(D,{flexDirection:`column`,marginTop:1,marginLeft:2,children:[(0,L.jsx)(D,{children:(0,L.jsxs)(O,{dimColor:!0,children:[(0,L.jsx)(O,{bold:!0,children:e.length}),` tasks (`,(0,L.jsx)(O,{bold:!0,children:u}),` done, `,f>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(O,{bold:!0,children:f}),` in progress, `]}),(0,L.jsx)(O,{bold:!0,children:d}),` open)`]})}),v]}):(0,L.jsx)(D,{flexDirection:`column`,children:v})}function We(e){switch(e){case`completed`:return{icon:h.tick,color:`success`};case`in_progress`:return{icon:h.squareSmallFilled,color:`claude`};case`pending`:return{icon:h.squareSmall,color:void 0}}}function Ge({task:e,openBlockers:t,columns:n}){let r=e.status===`completed`,i=e.status===`in_progress`,a=t.length>0,{icon:o,color:s}=We(e.status),c=Math.max(15,n-15),l=Se(e.subject,c);return(0,L.jsx)(D,{flexDirection:`column`,children:(0,L.jsxs)(D,{children:[(0,L.jsxs)(O,{color:s,children:[o,` `]}),(0,L.jsx)(O,{bold:i,strikethrough:r,dimColor:r||a,children:l}),a&&(0,L.jsxs)(O,{dimColor:!0,children:[` `,h.pointerSmall,` blocked by`,` `,[...t].sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>`#${e}`).join(`, `)]})]})})}var I,L,Ke,qe=e((()=>{m(),I=t(k(),1),w(),A(),ge(),Ce(),T(),L=j(),Ke=3e4}));function Je(){l(ot,this).emit()}function Ye(e){if(!(e===l(V,this)&&l(B,this)!==null)){l(B,this)?.close(),d(B,this,null),d(V,this,e);try{d(B,this,Ie(e,l(st,this))),l(B,this).unref()}catch{}}}function Xe(e){d(H,this,null);let t=_();t===e&&C(t).then(async e=>{e.length>0&&e.every(e=>e.status===`completed`)&&(await ne(t),d(R,this,[]),d(z,this,!0)),i(J,this,Je).call(this)})}function Ze(){l(H,this)&&(clearTimeout(l(H,this)),d(H,this,null))}function Qe(){l(B,this)?.close(),d(B,this,null),d(V,this,null),l(G,this)?.call(this),d(G,this,null),i(J,this,Ze).call(this),l(U,this)&&clearTimeout(l(U,this)),l(W,this)&&clearTimeout(l(W,this)),d(U,this,null),d(W,this,null),d(q,this,!1)}function $e(){return ut??(ut=new lt)}function et(){let e=y()?$e():null;return(0,nt.useSyncExternalStore)(e?e.subscribe:ft,e?e.getSnapshot:pt)}function tt(){let e=et(),t=ce(),n=e===void 0;return(0,nt.useEffect)(()=>{n&&t(e=>e.expandedView===`tasks`?{...e,expandedView:`none`}:e)},[n,t]),e}var nt,rt,it,at,R,z,B,V,H,U,W,G,ot,K,q,J,st,ct,lt,ut,dt,ft,pt,mt=e((()=>{nt=t(k(),1),v(),pe(),T(),f(),a(),n(),o(),s(),c(),rt=5e3,it=50,at=5e3,R=new WeakMap,z=new WeakMap,B=new WeakMap,V=new WeakMap,H=new WeakMap,U=new WeakMap,W=new WeakMap,G=new WeakMap,ot=new WeakMap,K=new WeakMap,q=new WeakMap,J=new WeakSet,st=new WeakMap,ct=new WeakMap,lt=class{constructor(){p(this,J),u(this,R,void 0),u(this,z,!1),u(this,B,null),u(this,V,null),u(this,H,null),u(this,U,null),u(this,W,null),u(this,G,null),u(this,ot,he()),u(this,K,0),u(this,q,!1),r(this,`getSnapshot`,()=>l(z,this)?void 0:l(R,this)),r(this,`subscribe`,e=>{var t;let n=l(ot,this).subscribe(e);d(K,this,(t=l(K,this),t++,t)),l(q,this)||(d(q,this,!0),d(G,this,S(l(st,this))),l(ct,this).call(this));let r=!1;return()=>{var e;r||(r=!0,n(),d(K,this,(e=l(K,this),e--,e)),l(K,this)===0&&i(J,this,Qe).call(this))}}),u(this,st,()=>{l(U,this)&&clearTimeout(l(U,this)),d(U,this,setTimeout(()=>void l(ct,this).call(this),it)),l(U,this).unref()}),u(this,ct,async()=>{let e=_();i(J,this,Ye).call(this,b(e));let t=(await C(e)).filter(e=>!e.metadata?._internal);d(R,this,t);let n=t.some(e=>e.status!==`completed`);n||t.length===0?(d(z,this,t.length===0),i(J,this,Ze).call(this)):l(H,this)===null&&!l(z,this)&&(d(H,this,setTimeout(i(J,this,Xe).bind(this,e),rt)),l(H,this).unref()),i(J,this,Je).call(this),l(W,this)&&(clearTimeout(l(W,this)),d(W,this,null)),n&&(d(W,this,setTimeout(l(st,this),at)),l(W,this).unref())})}},ut=null,dt=()=>{},ft=()=>dt,pt=()=>void 0})),ht=e((()=>{A(),Fe(),j()}));function gt({message:e,mode:t,messageColor:n,glimmerIndex:r,flashOpacity:i,shimmerColor:a,stalledIntensity:o=0}){let[s]=le(),c=ke(s),{segments:l,messageWidth:u}=_t.useMemo(()=>{let t=[];for(let{segment:n}of be().segment(e))t.push({segment:n,width:E(n)});return{segments:t,messageWidth:E(e)}},[e]);if(!e)return null;if(o>0){let t=c[n],r=t?Ne(t):null;if(r){let t=Oe(je(r,vt,o));return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(O,{color:t,children:e}),(0,Y.jsx)(O,{color:t,children:` `})]})}let i=o>.5?`error`:n;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(O,{color:i,children:e}),(0,Y.jsx)(O,{color:i,children:` `})]})}if(t===`tool-use`){let t=c[n],r=c[a],o=t?Ne(t):null,s=r?Ne(r):null;return o&&s?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(O,{color:Oe(je(o,s,i)),children:e}),(0,Y.jsx)(O,{color:n,children:` `})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(O,{color:i>.5?a:n,children:e}),(0,Y.jsx)(O,{color:n,children:` `})]})}let d=r-1,f=r+1;if(d>=u||f<0)return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(O,{color:n,children:e}),(0,Y.jsx)(O,{color:n,children:` `})]});let p=Math.max(0,d),m=0,h=``,g=``,_=``;for(let{segment:e,width:t}of l)m+t<=p?h+=e:m>f?_+=e:g+=e,m+=t;return(0,Y.jsxs)(Y.Fragment,{children:[h&&(0,Y.jsx)(O,{color:n,children:h}),(0,Y.jsx)(O,{color:a,children:g}),_&&(0,Y.jsx)(O,{color:n,children:_}),(0,Y.jsx)(O,{color:n,children:` `})]})}var _t,Y,vt,yt=e((()=>{_t=t(k(),1),A(),xe(),Fe(),De(),Y=j(),vt={r:171,g:43,b:63}}));function bt(e,t,n){let r=e===`requesting`?50:200,[i,a]=de(n?null:r),o=(0,xt.useMemo)(()=>E(t),[t]);if(n)return[i,-100];let s=Math.floor(a/r),c=o+20;return e===`requesting`?[i,s%c-10]:[i,o+10-s%c]}var xt,St=e((()=>{xt=t(k(),1),A()}));function Ct(e,t,n=!1,r=!1){let i=(0,X.useRef)(e),a=(0,X.useRef)(t),o=(0,X.useRef)(e),s=(0,X.useRef)(0),c=(0,X.useRef)(e);t>a.current&&(i.current=e,a.current=t,s.current=0,c.current=e);let l;n?(l=0,i.current=e):l=t>0?e-i.current:e-o.current;let u=l>3e3&&!n,d=u?Math.min((l-3e3)/2e3,1):0;if(!r&&(d>0||s.current>0)){let t=e-c.current;if(t>=50){let n=Math.floor(t/50),r=s.current;for(let e=0;e<n;e++){let e=d-r;if(Math.abs(e)<.01){r=d;break}r+=e*.1}s.current=r,c.current=e}}else s.current=d,c.current=e;return{isStalled:u,stalledIntensity:r?d:s.current}}var X,wt=e((()=>{X=t(k(),1)})),Tt=e((()=>{ht(),yt(),Ee(),Ae(),St(),wt(),De()}));function Et({mode:e,reducedMotion:t,hasActiveTools:n,responseLengthRef:r,message:i,messageColor:a,shimmerColor:o,overrideColor:s,loadingStartTimeRef:c,totalPausedMsRef:l,pauseStartTimeRef:u,spinnerSuffix:d,verbose:f,columns:p,agentTokens:m,leaderIsIdle:g=!1,thinkingStatus:_}){let[v,y]=de(t?null:50),b=Date.now(),ee=u.current===null?b-c.current-l.current:u.current-c.current-l.current,x=r.current,{isStalled:te,stalledIntensity:S}=Ct(y,x,n||g,t),C=t?0:Math.floor(y/120),ne=e===`requesting`?50:200,w=(0,Ot.useMemo)(()=>E(i),[i]),re=w+20,ie=Math.floor(y/ne),ae=t||te?-100:e===`requesting`?ie%re-10:w+10-ie%re,oe=t?0:e===`tool-use`?(Math.sin(y/1e3*Math.PI)+1)/2:0,T=(0,Ot.useRef)(x);if(t)T.current=x;else{let e=x-T.current;if(e>0){let t;t=e<70?3:e<200?Math.max(8,Math.ceil(e*.15)):50,T.current=Math.min(T.current+t,x)}}let se=T.current,ce=Math.round(se/4),le=Te(ee),k=E(le),fe=ce+m,A=we(fe),j=E(`${h.arrowDown} ${A} tokens`),M=_===`thinking`?`thinking`:typeof _==`number`?`thought for ${Math.max(1,Math.round(_/1e3))}s`:null,pe=M?E(M):0,me=w+2,he=kt,ge=_!==null,N=f||ee>jt,_e=p-me-5,P=ge&&_e>pe;!P&&ge&&_===`thinking`&&_e>At&&(M=`thinking`,pe=At,P=!0);let ve=P?pe+he:0,ye=N&&_e>ve+k,be=ve+(ye?k+he:0),xe=N&&fe>0&&_e>be+j,Se=P&&_===`thinking`&&!d&&!ye&&!xe&&!0,Ce=(y-Pt)/1e3,Ee=y<Pt?0:(Math.sin(Ce*Math.PI*2/Ft)+1)/2,De=Oe(je(Mt,Nt,Ee)),ke=[...d?[(0,Z.jsx)(O,{dimColor:!0,children:d},`suffix`)]:[],...ye?[(0,Z.jsx)(O,{dimColor:!0,children:le},`elapsedTime`)]:[],...xe?[(0,Z.jsxs)(D,{flexDirection:`row`,children:[(0,Z.jsx)(Dt,{mode:e}),(0,Z.jsxs)(O,{dimColor:!0,children:[A,` tokens`]})]},`tokens`)]:[],...P&&M?[_===`thinking`&&!t?(0,Z.jsx)(O,{color:De,children:Se?`(${M})`:M},`thinking`):(0,Z.jsx)(O,{dimColor:!0,children:M},`thinking`)]:[]],Ae=ke.length>0?Se?(0,Z.jsx)(ue,{children:ke}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(O,{dimColor:!0,children:`(`}),(0,Z.jsx)(ue,{children:ke}),(0,Z.jsx)(O,{dimColor:!0,children:`)`})]}):null;return(0,Z.jsxs)(D,{ref:v,flexDirection:`row`,flexWrap:`wrap`,marginTop:1,width:`100%`,children:[(0,Z.jsx)(Pe,{frame:C,messageColor:a,stalledIntensity:s?0:S,reducedMotion:t,time:y}),(0,Z.jsx)(gt,{message:i,mode:e,messageColor:a,glimmerIndex:ae,flashOpacity:oe,shimmerColor:o,stalledIntensity:s?0:S}),Ae]})}function Dt({mode:e}){switch(e){case`tool-input`:case`tool-use`:case`responding`:case`thinking`:return(0,Z.jsx)(D,{width:2,children:(0,Z.jsx)(O,{dimColor:!0,children:h.arrowDown})});case`requesting`:return(0,Z.jsx)(D,{width:2,children:(0,Z.jsx)(O,{dimColor:!0,children:h.arrowUp})})}}var Ot,Z,kt,At,jt,Mt,Nt,Pt,Ft,It=e((()=>{m(),Ot=t(k(),1),A(),Ce(),yt(),Ae(),wt(),De(),Z=j(),kt=E(` · `),At=E(`thinking`),jt=3e4,Mt={r:153,g:153,b:153},Nt={r:185,g:185,b:185},Pt=3e3,Ft=2}));function Lt(e){return(0,$.jsx)(Rt,{...e})}function Rt({mode:e,loadingStartTimeRef:t,totalPausedMsRef:n,pauseStartTimeRef:r,spinnerTip:i,responseLengthRef:a,overrideColor:o,overrideShimmerColor:s,overrideMessage:c,spinnerSuffix:l,verbose:u,hasActiveTools:d=!1,leaderIsIdle:f=!1}){let p=te(),m=p.prefersReducedMotion??!1,h=ee(e=>e.tasks),g=ee(e=>e.expandedView)===`tasks`,{columns:_}=fe(),v=et(),[y,b]=(0,Q.useState)(null),x=(0,Q.useRef)(null);(0,Q.useEffect)(()=>{let t=null,n=null;if(e===`thinking`)x.current===null&&(x.current=Date.now(),b(`thinking`));else if(x.current!==null){let e=Date.now()-x.current,r=Date.now()-x.current,i=Math.max(0,2e3-r);x.current=null;let a=()=>{b(e),n=setTimeout(b,2e3,null)};i>0?t=setTimeout(a,i):a()}return()=>{t&&clearTimeout(t),n&&clearTimeout(n)}},[e]);let S=v?.find(e=>e.status!==`pending`&&e.status!==`completed`),C=Bt(v),[ne]=(0,Q.useState)(()=>ie(Be())),w=`${c??S?.activeForm??S?.subject??ne}…`;(0,Q.useEffect)(()=>{let t=`spinner-${e}`;return Re.startCLIActivity(t),()=>{Re.endCLIActivity(t)}},[e]);let re=0;for(let e of Object.values(h))e.status===`running`&&oe(e)&&e.progress?.tokenCount&&(re+=e.progress.tokenCount);let T=r.current===null?Date.now()-t.current-n.current:r.current-t.current-n.current,se=o??`claude`,ce=s??`claudeShimmer`,E=p.spinnerTipsEnabled!==!1,le=E&&T>18e5,ue=E&&T>3e4&&!ye().btwUseCount,k=le&&!C?`Use /clear to start fresh when switching topics and free up context`:ue&&!C?`Use /btw to ask a quick side question without interrupting Work Mate's current work`:i;return(0,$.jsxs)(D,{flexDirection:`column`,width:`100%`,alignItems:`flex-start`,children:[(0,$.jsx)(Et,{mode:e,reducedMotion:m,hasActiveTools:d,responseLengthRef:a,message:w,messageColor:se,shimmerColor:ce,overrideColor:o,loadingStartTimeRef:t,totalPausedMsRef:n,pauseStartTimeRef:r,spinnerSuffix:l,verbose:u,columns:_,agentTokens:re,leaderIsIdle:f,thinkingStatus:y}),g&&v&&v.length>0?(0,$.jsx)(D,{width:`100%`,flexDirection:`column`,children:(0,$.jsx)(ae,{children:(0,$.jsx)(Ue,{tasks:v})})}):C||k?(0,$.jsxs)(D,{width:`100%`,flexDirection:`column`,children:[null,(C||k)&&(0,$.jsx)(ae,{children:(0,$.jsx)(O,{dimColor:!0,children:C?`Next: ${C.subject}`:`Tip: ${k}`})})]}):null]})}function zt(){let e=te().prefersReducedMotion??!1,[t,n]=de(e?null:120);if(e)return(0,$.jsx)(D,{ref:t,flexWrap:`wrap`,height:1,width:2,children:(0,$.jsx)(O,{color:`text`,children:`●`})});let r=Math.floor(n/120)%Ht.length;return(0,$.jsx)(D,{ref:t,flexWrap:`wrap`,height:1,width:2,children:(0,$.jsx)(O,{color:`text`,children:Ht[r]})})}function Bt(e){if(!e)return;let t=e.filter(e=>e.status===`pending`);if(t.length===0)return;let n=new Set(e.filter(e=>e.status!==`completed`).map(e=>e.id));return t.find(e=>!e.blockedBy.some(e=>n.has(e)))??t[0]}var Q,$,Vt,Ht,Ut=e((()=>{A(),Q=t(k(),1),g(),Ce(),ze(),He(),se(),qe(),mt(),v(),w(),Tt(),It(),x(),re(),M(),ve(),$=j(),Vt=Me(),Ht=[...Vt,...[...Vt].reverse()]}));export{bt as a,tt as c,Re as d,ze as f,St as i,Ue as l,Lt as n,mt as o,Ut as r,et as s,zt as t,qe as u};
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./defineProperty-C-QyHrDq.js";import{a as i,c as a,i as o,n as s,o as c,r as l,s as u,t as d}from"./classPrivateFieldSet2-D4U5K-I3.js";import{n as f,t as p}from"./classPrivateMethodInitSpec-BXQD0Vh4.js";import{n as m,t as h}from"./figures-5ThXQEtq.js";import{AC as g,Gy as _,Ip as v,Jy as y,Ky as b,Lp as ee,Mp as x,Np as te,Xy as S,Yy as C,Zy as ne,bb as w,fs as re,jC as ie,nb as ae,ps as oe,qy as T,rb as se,zp as ce}from"./loadAgentsDir-B0Anodo0.js";import{Gr as E,H as le,I as D,P as O,T as ue,ai as k,mt as de,ot as fe,t as A}from"./src-DL3w8VPk.js";import{t as j}from"./jsx-runtime-Bb4Xn-E0.js";import{It as M,Jn as pe,m as me,qn as he}from"./state-B4jiUise.js";import{Hn as ge,Vn as N,h as _e,t as P}from"./settings-B2jvL8Dp.js";import{p as ve,s as ye}from"./config-C-Y2qtB2.js";import{n as be,o as xe}from"./intl-D2kgJmX7.js";import{S as Se,_ as Ce,f as we,l as Te}from"./startupProfiler-CJdr3SxP.js";import{o as Ee}from"./TextInput-B8ruWRf2.js";import{a as De,c as Oe,l as ke,n as Ae,o as je,r as Me,s as Ne,t as Pe,u as Fe}from"./SpinnerGlyph-CmkRUvHe.js";import{watch as Ie}from"fs";var Le,Re,ze=e((()=>{M(),n(),Le=class e{constructor(e){r(this,`activeOperations`,new Set),r(this,`lastUserActivityTime`,0),r(this,`lastCLIRecordedTime`,void 0),r(this,`isCLIActive`,!1),r(this,`USER_ACTIVITY_TIMEOUT_MS`,5e3),r(this,`getNow`,void 0),r(this,`getActiveTimeCounter`,void 0),this.getNow=e?.getNow??(()=>Date.now()),this.getActiveTimeCounter=e?.getActiveTimeCounter??me,this.lastCLIRecordedTime=this.getNow()}static getInstance(){return e.instance||(e.instance=new e),e.instance}static resetInstance(){e.instance=null}static createInstance(t){return e.instance=new e(t),e.instance}recordUserActivity(){if(!this.isCLIActive&&this.lastUserActivityTime!==0){let e=(this.getNow()-this.lastUserActivityTime)/1e3;if(e>0){let t=this.getActiveTimeCounter();t&&e<this.USER_ACTIVITY_TIMEOUT_MS/1e3&&t.add(e,{type:`user`})}}this.lastUserActivityTime=this.getNow()}startCLIActivity(e){this.activeOperations.has(e)&&this.endCLIActivity(e);let t=this.activeOperations.size===0;this.activeOperations.add(e),t&&(this.isCLIActive=!0,this.lastCLIRecordedTime=this.getNow())}endCLIActivity(e){if(this.activeOperations.delete(e),this.activeOperations.size===0){let e=this.getNow(),t=(e-this.lastCLIRecordedTime)/1e3;if(t>0){let e=this.getActiveTimeCounter();e&&e.add(t,{type:`cli`})}this.lastCLIRecordedTime=e,this.isCLIActive=!1}}async trackOperation(e,t){this.startCLIActivity(e);try{return await t()}finally{this.endCLIActivity(e)}}getActivityStates(){return{isUserActive:(this.getNow()-this.lastUserActivityTime)/1e3<this.USER_ACTIVITY_TIMEOUT_MS/1e3,isCLIActive:this.isCLIActive,activeOperationCount:this.activeOperations.size}}},r(Le,`instance`,null),Re=Le.getInstance()}));function Be(){let e=P().spinnerVerbs;return e?e.mode===`replace`?e.verbs.length>0?e.verbs:Ve:[...Ve,...e.verbs]:Ve}var Ve,He=e((()=>{_e(),Ve=`Accomplishing.Actioning.Actualizing.Architecting.Baking.Beaming.Beboppin'.Befuddling.Billowing.Blanching.Bloviating.Boogieing.Boondoggling.Booping.Bootstrapping.Brewing.Bunning.Burrowing.Calculating.Canoodling.Caramelizing.Cascading.Catapulting.Cerebrating.Channeling.Channelling.Choreographing.Churning.Clauding.Coalescing.Cogitating.Combobulating.Composing.Computing.Concocting.Considering.Contemplating.Cooking.Crafting.Creating.Crunching.Crystallizing.Cultivating.Deciphering.Deliberating.Determining.Dilly-dallying.Discombobulating.Doing.Doodling.Drizzling.Ebbing.Effecting.Elucidating.Embellishing.Enchanting.Envisioning.Evaporating.Fermenting.Fiddle-faddling.Finagling.Flambéing.Flibbertigibbeting.Flowing.Flummoxing.Fluttering.Forging.Forming.Frolicking.Frosting.Gallivanting.Galloping.Garnishing.Generating.Gesticulating.Germinating.Gitifying.Grooving.Gusting.Harmonizing.Hashing.Hatching.Herding.Honking.Hullaballooing.Hyperspacing.Ideating.Imagining.Improvising.Incubating.Inferring.Infusing.Ionizing.Jitterbugging.Julienning.Kneading.Leavening.Levitating.Lollygagging.Manifesting.Marinating.Meandering.Metamorphosing.Misting.Moonwalking.Moseying.Mulling.Mustering.Musing.Nebulizing.Nesting.Newspapering.Noodling.Nucleating.Orbiting.Orchestrating.Osmosing.Perambulating.Percolating.Perusing.Philosophising.Photosynthesizing.Pollinating.Pondering.Pontificating.Pouncing.Precipitating.Prestidigitating.Processing.Proofing.Propagating.Puttering.Puzzling.Quantumizing.Razzle-dazzling.Razzmatazzing.Recombobulating.Reticulating.Roosting.Ruminating.Sautéing.Scampering.Schlepping.Scurrying.Seasoning.Shenaniganing.Shimmying.Simmering.Skedaddling.Sketching.Slithering.Smooshing.Sock-hopping.Spelunking.Spinning.Sprouting.Stewing.Sublimating.Swirling.Swooping.Symbioting.Synthesizing.Tempering.Thinking.Thundering.Tinkering.Tomfoolering.Topsy-turvying.Transfiguring.Transmuting.Twisting.Undulating.Unfurling.Unravelling.Vibing.Waddling.Wandering.Warping.Whatchamacalliting.Whirlpooling.Whirring.Whisking.Wibbling.Working.Wrangling.Zesting.Zigzagging`.split(`.`)}));function F(e,t){let n=parseInt(e.id,10),r=parseInt(t.id,10);return!isNaN(n)&&!isNaN(r)?n-r:e.id.localeCompare(t.id)}function Ue({tasks:e,isStandalone:t=!1}){let[,n]=I.useState(0),{rows:r,columns:i}=fe(),a=I.useRef(new Map),o=I.useRef(null);o.current===null&&(o.current=new Set(e.filter(e=>e.status===`completed`).map(e=>e.id)));let s=r<=10?0:Math.min(10,Math.max(3,r-14)),c=new Set(e.filter(e=>e.status===`completed`).map(e=>e.id)),l=Date.now();for(let e of c)o.current.has(e)||a.current.set(e,l);for(let e of a.current.keys())c.has(e)||a.current.delete(e);if(o.current=c,I.useEffect(()=>{if(a.current.size===0)return;let e=Date.now(),t=1/0;for(let n of a.current.values()){let r=n+Ke;r>e&&r<t&&(t=r)}if(t===1/0)return;let r=setTimeout(e=>e(e=>e+1),t-e,n);return()=>clearTimeout(r)},[e]),!y()||e.length===0)return null;let u=N(e,e=>e.status===`completed`),d=N(e,e=>e.status===`pending`),f=e.length-u-d,p=new Set(e.filter(e=>e.status!==`completed`).map(e=>e.id)),m=e.length>s,h,g;if(m){let t=[],n=[];for(let r of e.filter(e=>e.status===`completed`)){let e=a.current.get(r.id);e&&l-e<Ke?t.push(r):n.push(r)}t.sort(F),n.sort(F);let r=e.filter(e=>e.status===`in_progress`).sort(F),i=e.filter(e=>e.status===`pending`).sort((e,t)=>{let n=e.blockedBy.some(e=>p.has(e));return n===t.blockedBy.some(e=>p.has(e))?F(e,t):n?1:-1}),o=[...t,...r,...i,...n];h=o.slice(0,s),g=o.slice(s)}else h=[...e].sort(F),g=[];let _=``;if(g.length>0){let e=[],t=N(g,e=>e.status===`pending`),n=N(g,e=>e.status===`in_progress`),r=N(g,e=>e.status===`completed`);n>0&&e.push(`${n} in progress`),t>0&&e.push(`${t} pending`),r>0&&e.push(`${r} completed`),_=` … +${e.join(`, `)}`}let v=(0,L.jsxs)(L.Fragment,{children:[h.map(e=>(0,L.jsx)(Ge,{task:e,openBlockers:e.blockedBy.filter(e=>p.has(e)),columns:i},e.id)),s>0&&_&&(0,L.jsx)(O,{dimColor:!0,children:_})]});return t?(0,L.jsxs)(D,{flexDirection:`column`,marginTop:1,marginLeft:2,children:[(0,L.jsx)(D,{children:(0,L.jsxs)(O,{dimColor:!0,children:[(0,L.jsx)(O,{bold:!0,children:e.length}),` tasks (`,(0,L.jsx)(O,{bold:!0,children:u}),` done, `,f>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(O,{bold:!0,children:f}),` in progress, `]}),(0,L.jsx)(O,{bold:!0,children:d}),` open)`]})}),v]}):(0,L.jsx)(D,{flexDirection:`column`,children:v})}function We(e){switch(e){case`completed`:return{icon:h.tick,color:`success`};case`in_progress`:return{icon:h.squareSmallFilled,color:`claude`};case`pending`:return{icon:h.squareSmall,color:void 0}}}function Ge({task:e,openBlockers:t,columns:n}){let r=e.status===`completed`,i=e.status===`in_progress`,a=t.length>0,{icon:o,color:s}=We(e.status),c=Math.max(15,n-15),l=Se(e.subject,c);return(0,L.jsx)(D,{flexDirection:`column`,children:(0,L.jsxs)(D,{children:[(0,L.jsxs)(O,{color:s,children:[o,` `]}),(0,L.jsx)(O,{bold:i,strikethrough:r,dimColor:r||a,children:l}),a&&(0,L.jsxs)(O,{dimColor:!0,children:[` `,h.pointerSmall,` blocked by`,` `,[...t].sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>`#${e}`).join(`, `)]})]})})}var I,L,Ke,qe=e((()=>{m(),I=t(k(),1),w(),A(),ge(),Ce(),T(),L=j(),Ke=3e4}));function Je(){l(ot,this).emit()}function Ye(e){if(!(e===l(V,this)&&l(B,this)!==null)){l(B,this)?.close(),d(B,this,null),d(V,this,e);try{d(B,this,Ie(e,l(st,this))),l(B,this).unref()}catch{}}}function Xe(e){d(H,this,null);let t=_();t===e&&C(t).then(async e=>{e.length>0&&e.every(e=>e.status===`completed`)&&(await ne(t),d(R,this,[]),d(z,this,!0)),i(J,this,Je).call(this)})}function Ze(){l(H,this)&&(clearTimeout(l(H,this)),d(H,this,null))}function Qe(){l(B,this)?.close(),d(B,this,null),d(V,this,null),l(G,this)?.call(this),d(G,this,null),i(J,this,Ze).call(this),l(U,this)&&clearTimeout(l(U,this)),l(W,this)&&clearTimeout(l(W,this)),d(U,this,null),d(W,this,null),d(q,this,!1)}function $e(){return ut??(ut=new lt)}function et(){let e=y()?$e():null;return(0,nt.useSyncExternalStore)(e?e.subscribe:ft,e?e.getSnapshot:pt)}function tt(){let e=et(),t=ce(),n=e===void 0;return(0,nt.useEffect)(()=>{n&&t(e=>e.expandedView===`tasks`?{...e,expandedView:`none`}:e)},[n,t]),e}var nt,rt,it,at,R,z,B,V,H,U,W,G,ot,K,q,J,st,ct,lt,ut,dt,ft,pt,mt=e((()=>{nt=t(k(),1),v(),pe(),T(),f(),a(),n(),o(),s(),c(),rt=5e3,it=50,at=5e3,R=new WeakMap,z=new WeakMap,B=new WeakMap,V=new WeakMap,H=new WeakMap,U=new WeakMap,W=new WeakMap,G=new WeakMap,ot=new WeakMap,K=new WeakMap,q=new WeakMap,J=new WeakSet,st=new WeakMap,ct=new WeakMap,lt=class{constructor(){p(this,J),u(this,R,void 0),u(this,z,!1),u(this,B,null),u(this,V,null),u(this,H,null),u(this,U,null),u(this,W,null),u(this,G,null),u(this,ot,he()),u(this,K,0),u(this,q,!1),r(this,`getSnapshot`,()=>l(z,this)?void 0:l(R,this)),r(this,`subscribe`,e=>{var t;let n=l(ot,this).subscribe(e);d(K,this,(t=l(K,this),t++,t)),l(q,this)||(d(q,this,!0),d(G,this,S(l(st,this))),l(ct,this).call(this));let r=!1;return()=>{var e;r||(r=!0,n(),d(K,this,(e=l(K,this),e--,e)),l(K,this)===0&&i(J,this,Qe).call(this))}}),u(this,st,()=>{l(U,this)&&clearTimeout(l(U,this)),d(U,this,setTimeout(()=>void l(ct,this).call(this),it)),l(U,this).unref()}),u(this,ct,async()=>{let e=_();i(J,this,Ye).call(this,b(e));let t=(await C(e)).filter(e=>!e.metadata?._internal);d(R,this,t);let n=t.some(e=>e.status!==`completed`);n||t.length===0?(d(z,this,t.length===0),i(J,this,Ze).call(this)):l(H,this)===null&&!l(z,this)&&(d(H,this,setTimeout(i(J,this,Xe).bind(this,e),rt)),l(H,this).unref()),i(J,this,Je).call(this),l(W,this)&&(clearTimeout(l(W,this)),d(W,this,null)),n&&(d(W,this,setTimeout(l(st,this),at)),l(W,this).unref())})}},ut=null,dt=()=>{},ft=()=>dt,pt=()=>void 0})),ht=e((()=>{A(),Fe(),j()}));function gt({message:e,mode:t,messageColor:n,glimmerIndex:r,flashOpacity:i,shimmerColor:a,stalledIntensity:o=0}){let[s]=le(),c=ke(s),{segments:l,messageWidth:u}=_t.useMemo(()=>{let t=[];for(let{segment:n}of be().segment(e))t.push({segment:n,width:E(n)});return{segments:t,messageWidth:E(e)}},[e]);if(!e)return null;if(o>0){let t=c[n],r=t?Ne(t):null;if(r){let t=Oe(je(r,vt,o));return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(O,{color:t,children:e}),(0,Y.jsx)(O,{color:t,children:` `})]})}let i=o>.5?`error`:n;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(O,{color:i,children:e}),(0,Y.jsx)(O,{color:i,children:` `})]})}if(t===`tool-use`){let t=c[n],r=c[a],o=t?Ne(t):null,s=r?Ne(r):null;return o&&s?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(O,{color:Oe(je(o,s,i)),children:e}),(0,Y.jsx)(O,{color:n,children:` `})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(O,{color:i>.5?a:n,children:e}),(0,Y.jsx)(O,{color:n,children:` `})]})}let d=r-1,f=r+1;if(d>=u||f<0)return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(O,{color:n,children:e}),(0,Y.jsx)(O,{color:n,children:` `})]});let p=Math.max(0,d),m=0,h=``,g=``,_=``;for(let{segment:e,width:t}of l)m+t<=p?h+=e:m>f?_+=e:g+=e,m+=t;return(0,Y.jsxs)(Y.Fragment,{children:[h&&(0,Y.jsx)(O,{color:n,children:h}),(0,Y.jsx)(O,{color:a,children:g}),_&&(0,Y.jsx)(O,{color:n,children:_}),(0,Y.jsx)(O,{color:n,children:` `})]})}var _t,Y,vt,yt=e((()=>{_t=t(k(),1),A(),xe(),Fe(),De(),Y=j(),vt={r:171,g:43,b:63}}));function bt(e,t,n){let r=e===`requesting`?50:200,[i,a]=de(n?null:r),o=(0,xt.useMemo)(()=>E(t),[t]);if(n)return[i,-100];let s=Math.floor(a/r),c=o+20;return e===`requesting`?[i,s%c-10]:[i,o+10-s%c]}var xt,St=e((()=>{xt=t(k(),1),A()}));function Ct(e,t,n=!1,r=!1){let i=(0,X.useRef)(e),a=(0,X.useRef)(t),o=(0,X.useRef)(e),s=(0,X.useRef)(0),c=(0,X.useRef)(e);t>a.current&&(i.current=e,a.current=t,s.current=0,c.current=e);let l;n?(l=0,i.current=e):l=t>0?e-i.current:e-o.current;let u=l>3e3&&!n,d=u?Math.min((l-3e3)/2e3,1):0;if(!r&&(d>0||s.current>0)){let t=e-c.current;if(t>=50){let n=Math.floor(t/50),r=s.current;for(let e=0;e<n;e++){let e=d-r;if(Math.abs(e)<.01){r=d;break}r+=e*.1}s.current=r,c.current=e}}else s.current=d,c.current=e;return{isStalled:u,stalledIntensity:r?d:s.current}}var X,wt=e((()=>{X=t(k(),1)})),Tt=e((()=>{ht(),yt(),Ee(),Ae(),St(),wt(),De()}));function Et({mode:e,reducedMotion:t,hasActiveTools:n,responseLengthRef:r,message:i,messageColor:a,shimmerColor:o,overrideColor:s,loadingStartTimeRef:c,totalPausedMsRef:l,pauseStartTimeRef:u,spinnerSuffix:d,verbose:f,columns:p,agentTokens:m,leaderIsIdle:g=!1,thinkingStatus:_}){let[v,y]=de(t?null:50),b=Date.now(),ee=u.current===null?b-c.current-l.current:u.current-c.current-l.current,x=r.current,{isStalled:te,stalledIntensity:S}=Ct(y,x,n||g,t),C=t?0:Math.floor(y/120),ne=e===`requesting`?50:200,w=(0,Ot.useMemo)(()=>E(i),[i]),re=w+20,ie=Math.floor(y/ne),ae=t||te?-100:e===`requesting`?ie%re-10:w+10-ie%re,oe=t?0:e===`tool-use`?(Math.sin(y/1e3*Math.PI)+1)/2:0,T=(0,Ot.useRef)(x);if(t)T.current=x;else{let e=x-T.current;if(e>0){let t;t=e<70?3:e<200?Math.max(8,Math.ceil(e*.15)):50,T.current=Math.min(T.current+t,x)}}let se=T.current,ce=Math.round(se/4),le=Te(ee),k=E(le),fe=ce+m,A=we(fe),j=E(`${h.arrowDown} ${A} tokens`),M=_===`thinking`?`thinking`:typeof _==`number`?`thought for ${Math.max(1,Math.round(_/1e3))}s`:null,pe=M?E(M):0,me=w+2,he=kt,ge=_!==null,N=f||ee>jt,_e=p-me-5,P=ge&&_e>pe;!P&&ge&&_===`thinking`&&_e>At&&(M=`thinking`,pe=At,P=!0);let ve=P?pe+he:0,ye=N&&_e>ve+k,be=ve+(ye?k+he:0),xe=N&&fe>0&&_e>be+j,Se=P&&_===`thinking`&&!d&&!ye&&!xe&&!0,Ce=(y-Pt)/1e3,Ee=y<Pt?0:(Math.sin(Ce*Math.PI*2/Ft)+1)/2,De=Oe(je(Mt,Nt,Ee)),ke=[...d?[(0,Z.jsx)(O,{dimColor:!0,children:d},`suffix`)]:[],...ye?[(0,Z.jsx)(O,{dimColor:!0,children:le},`elapsedTime`)]:[],...xe?[(0,Z.jsxs)(D,{flexDirection:`row`,children:[(0,Z.jsx)(Dt,{mode:e}),(0,Z.jsxs)(O,{dimColor:!0,children:[A,` tokens`]})]},`tokens`)]:[],...P&&M?[_===`thinking`&&!t?(0,Z.jsx)(O,{color:De,children:Se?`(${M})`:M},`thinking`):(0,Z.jsx)(O,{dimColor:!0,children:M},`thinking`)]:[]],Ae=ke.length>0?Se?(0,Z.jsx)(ue,{children:ke}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(O,{dimColor:!0,children:`(`}),(0,Z.jsx)(ue,{children:ke}),(0,Z.jsx)(O,{dimColor:!0,children:`)`})]}):null;return(0,Z.jsxs)(D,{ref:v,flexDirection:`row`,flexWrap:`wrap`,marginTop:1,width:`100%`,children:[(0,Z.jsx)(Pe,{frame:C,messageColor:a,stalledIntensity:s?0:S,reducedMotion:t,time:y}),(0,Z.jsx)(gt,{message:i,mode:e,messageColor:a,glimmerIndex:ae,flashOpacity:oe,shimmerColor:o,stalledIntensity:s?0:S}),Ae]})}function Dt({mode:e}){switch(e){case`tool-input`:case`tool-use`:case`responding`:case`thinking`:return(0,Z.jsx)(D,{width:2,children:(0,Z.jsx)(O,{dimColor:!0,children:h.arrowDown})});case`requesting`:return(0,Z.jsx)(D,{width:2,children:(0,Z.jsx)(O,{dimColor:!0,children:h.arrowUp})})}}var Ot,Z,kt,At,jt,Mt,Nt,Pt,Ft,It=e((()=>{m(),Ot=t(k(),1),A(),Ce(),yt(),Ae(),wt(),De(),Z=j(),kt=E(` · `),At=E(`thinking`),jt=3e4,Mt={r:153,g:153,b:153},Nt={r:185,g:185,b:185},Pt=3e3,Ft=2}));function Lt(e){return(0,$.jsx)(Rt,{...e})}function Rt({mode:e,loadingStartTimeRef:t,totalPausedMsRef:n,pauseStartTimeRef:r,spinnerTip:i,responseLengthRef:a,overrideColor:o,overrideShimmerColor:s,overrideMessage:c,spinnerSuffix:l,verbose:u,hasActiveTools:d=!1,leaderIsIdle:f=!1}){let p=te(),m=p.prefersReducedMotion??!1,h=ee(e=>e.tasks),g=ee(e=>e.expandedView)===`tasks`,{columns:_}=fe(),v=et(),[y,b]=(0,Q.useState)(null),x=(0,Q.useRef)(null);(0,Q.useEffect)(()=>{let t=null,n=null;if(e===`thinking`)x.current===null&&(x.current=Date.now(),b(`thinking`));else if(x.current!==null){let e=Date.now()-x.current,r=Date.now()-x.current,i=Math.max(0,2e3-r);x.current=null;let a=()=>{b(e),n=setTimeout(b,2e3,null)};i>0?t=setTimeout(a,i):a()}return()=>{t&&clearTimeout(t),n&&clearTimeout(n)}},[e]);let S=v?.find(e=>e.status!==`pending`&&e.status!==`completed`),C=Bt(v),[ne]=(0,Q.useState)(()=>ie(Be())),w=`${c??S?.activeForm??S?.subject??ne}…`;(0,Q.useEffect)(()=>{let t=`spinner-${e}`;return Re.startCLIActivity(t),()=>{Re.endCLIActivity(t)}},[e]);let re=0;for(let e of Object.values(h))e.status===`running`&&oe(e)&&e.progress?.tokenCount&&(re+=e.progress.tokenCount);let T=r.current===null?Date.now()-t.current-n.current:r.current-t.current-n.current,se=o??`claude`,ce=s??`claudeShimmer`,E=p.spinnerTipsEnabled!==!1,le=E&&T>18e5,ue=E&&T>3e4&&!ye().btwUseCount,k=le&&!C?`Use /clear to start fresh when switching topics and free up context`:ue&&!C?`Use /btw to ask a quick side question without interrupting Work Mate's current work`:i;return(0,$.jsxs)(D,{flexDirection:`column`,width:`100%`,alignItems:`flex-start`,children:[(0,$.jsx)(Et,{mode:e,reducedMotion:m,hasActiveTools:d,responseLengthRef:a,message:w,messageColor:se,shimmerColor:ce,overrideColor:o,loadingStartTimeRef:t,totalPausedMsRef:n,pauseStartTimeRef:r,spinnerSuffix:l,verbose:u,columns:_,agentTokens:re,leaderIsIdle:f,thinkingStatus:y}),g&&v&&v.length>0?(0,$.jsx)(D,{width:`100%`,flexDirection:`column`,children:(0,$.jsx)(ae,{children:(0,$.jsx)(Ue,{tasks:v})})}):C||k?(0,$.jsxs)(D,{width:`100%`,flexDirection:`column`,children:[null,(C||k)&&(0,$.jsx)(ae,{children:(0,$.jsx)(O,{dimColor:!0,children:C?`Next: ${C.subject}`:`Tip: ${k}`})})]}):null]})}function zt(){let e=te().prefersReducedMotion??!1,[t,n]=de(e?null:120);if(e)return(0,$.jsx)(D,{ref:t,flexWrap:`wrap`,height:1,width:2,children:(0,$.jsx)(O,{color:`text`,children:`●`})});let r=Math.floor(n/120)%Ht.length;return(0,$.jsx)(D,{ref:t,flexWrap:`wrap`,height:1,width:2,children:(0,$.jsx)(O,{color:`text`,children:Ht[r]})})}function Bt(e){if(!e)return;let t=e.filter(e=>e.status===`pending`);if(t.length===0)return;let n=new Set(e.filter(e=>e.status!==`completed`).map(e=>e.id));return t.find(e=>!e.blockedBy.some(e=>n.has(e)))??t[0]}var Q,$,Vt,Ht,Ut=e((()=>{A(),Q=t(k(),1),g(),Ce(),ze(),He(),se(),qe(),mt(),v(),w(),Tt(),It(),x(),re(),M(),ve(),$=j(),Vt=Me(),Ht=[...Vt,...[...Vt].reverse()]}));export{bt as a,tt as c,Re as d,ze as f,St as i,Ue as l,Lt as n,mt as o,Ut as r,et as s,zt as t,qe as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,n as t,o as n}from"./rolldown-runtime-DaDcL9Zw.js";import{l as r,o as i}from"./envUtils-DfkgIdYf.js";import{n as a,t as o}from"./defineProperty-C-QyHrDq.js";import{Mp as s,Np as c,Op as l,ax as u,cx as d,kp as f,nx as p,ox as m,rx as h,sx as g,vb as _,yb as v}from"./loadAgentsDir-
|
|
1
|
+
import{a as e,n as t,o as n}from"./rolldown-runtime-DaDcL9Zw.js";import{l as r,o as i}from"./envUtils-DfkgIdYf.js";import{n as a,t as o}from"./defineProperty-C-QyHrDq.js";import{Mp as s,Np as c,Op as l,ax as u,cx as d,kp as f,nx as p,ox as m,rx as h,sx as g,vb as _,yb as v}from"./loadAgentsDir-B0Anodo0.js";import{Fr as y,Ft as b,G as x,Gr as S,H as C,Hr as w,I as T,Kr as E,Lr as ee,P as D,Pr as te,Vr as ne,Xn as re,ai as O,di as k,et as ie,fi as ae,hn as oe,j as se,mt as ce,qr as le,t as A,vn as ue,yn as de,zr as fe}from"./src-DL3w8VPk.js";import{t as j}from"./jsx-runtime-Bb4Xn-E0.js";import{c as pe,f as me,i as he,u as M}from"./debug-Bglx1aTu.js";import{Wt as ge,qt as _e}from"./settings-B2jvL8Dp.js";import{a as N,i as ve,n as ye,s as be}from"./execFileNoThrow-BTachNBI.js";import{o as xe,s as P}from"./log-D2TIwHBV.js";import{i as Se,o as Ce}from"./platform-BacQ6ACS.js";import{a as we,n as F,o as Te,t as Ee}from"./intl-D2kgJmX7.js";import{n as De,t as Oe}from"./notifications-Bc6k-Ozy.js";import{i as ke,o as Ae}from"./terminalSetup-B_10N_gE.js";import{s as je,t as Me}from"./history-BMycjPTT.js";import{r as Ne,t as Pe}from"./modifiersNative-BYHdmWw1.js";import{t as Fe}from"./useDoublePress-C9xxQzh1.js";import{tmpdir as Ie}from"os";import{basename as Le,extname as Re,isAbsolute as ze,join as Be}from"path";import{randomBytes as Ve}from"crypto";function He(){let e=process.platform,t=process.env.CLAUDE_CODE_TMPDIR||(e===`win32`?process.env.TEMP||`C:\\Temp`:Ie()),n=`claude_cli_latest_screenshot.png`,r={darwin:Be(t,n),linux:Be(t,n),win32:Be(t,n)},i=r[e]||r.linux,a={darwin:{checkImage:`osascript -e 'the clipboard as «class PNGf»'`,saveImage:`osascript -e 'set png_data to (the clipboard as «class PNGf»)' -e 'set fp to open for access POSIX file "${i}" with write permission' -e 'write png_data to fp' -e 'close access fp'`,getPath:`osascript -e 'get POSIX path of (the clipboard as «class furl»)'`,deleteFile:`rm -f "${i}"`},linux:{checkImage:`xclip -selection clipboard -t TARGETS -o 2>/dev/null | grep -E "image/(png|jpeg|jpg|gif|webp|bmp)" || wl-paste -l 2>/dev/null | grep -E "image/(png|jpeg|jpg|gif|webp|bmp)"`,saveImage:`xclip -selection clipboard -t image/png -o > "${i}" 2>/dev/null || wl-paste --type image/png > "${i}" 2>/dev/null || xclip -selection clipboard -t image/bmp -o > "${i}" 2>/dev/null || wl-paste --type image/bmp > "${i}"`,getPath:`xclip -selection clipboard -t text/plain -o 2>/dev/null || wl-paste 2>/dev/null`,deleteFile:`rm -f "${i}"`},win32:{checkImage:`powershell -NoProfile -Command "(Get-Clipboard -Format Image) -ne $null"`,saveImage:`powershell -NoProfile -Command "$img = Get-Clipboard -Format Image; if ($img) { $img.Save('${i.replace(/\\/g,`\\\\`)}', [System.Drawing.Imaging.ImageFormat]::Png) }"`,getPath:`powershell -NoProfile -Command "Get-Clipboard"`,deleteFile:`del /f "${i}"`}};return{commands:a[e]||a.linux,screenshotPath:i}}async function Ue(){return process.platform===`darwin`&&(await ye(`osascript`,[`-e`,`the clipboard as «class PNGf»`])).code===0}async function We(){let{commands:e,screenshotPath:t}=He();try{if((await N(e.checkImage,{shell:!0,reject:!1})).exitCode!==0||(await N(e.saveImage,{shell:!0,reject:!1})).exitCode!==0)return null;let n=M().readFileBytesSync(t);n.length>=2&&n[0]===66&&n[1]===77&&(n=await(await m())(n).png().toBuffer());let r=await u(n,n.length,`png`),i=r.buffer.toString(`base64`),a=p(i);return N(e.deleteFile,{shell:!0,reject:!1}),{base64:i,mediaType:a,dimensions:r.dimensions}}catch{return null}}async function Ge(){let{commands:e}=He();try{let t=await N(e.getPath,{shell:!0,reject:!1});return t.exitCode!==0||!t.stdout?null:t.stdout.trim()}catch(e){return P(e),null}}function Ke(e){return e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`)?e.slice(1,-1):e}function qe(e){if(process.platform===`win32`)return e;let t=`__DOUBLE_BACKSLASH_${Ve(8).toString(`hex`)}__`;return e.replace(/\\\\/g,t).replace(/\\(.)/g,`$1`).replace(new RegExp(t,`g`),`\\`)}function I(e){let t=qe(Ke(e.trim()));return Xe.test(t)}function Je(e){let t=qe(Ke(e.trim()));return Xe.test(t)?t:null}async function Ye(e){let t=Je(e);if(!t)return null;let n=t,r;try{if(ze(n))r=M().readFileBytesSync(n);else{let e=await Ge();e&&n===Le(e)&&(r=M().readFileBytesSync(e))}}catch(e){return P(e),null}if(!r)return null;if(r.length===0)return pe(`Image file is empty: ${n}`,{level:`warn`}),null;r.length>=2&&r[0]===66&&r[1]===77&&(r=await(await m())(r).png().toBuffer());let i=Re(n).slice(1).toLowerCase()||`png`,a=await u(r,r.length,i),o=a.buffer.toString(`base64`);return{path:n,base64:o,mediaType:p(o),dimensions:a.dimensions}}var Xe,Ze=t((()=>{be(),d(),g(),he(),ve(),me(),h(),xe(),Xe=/\.(png|jpe?g|gif|webp)$/i}));function Qe(e,t){let{addNotification:n}=De(),r=(0,L.useRef)(e),i=(0,L.useRef)(0),a=(0,L.useRef)(null);(0,L.useEffect)(()=>{let o=r.current;if(r.current=e,!(!t||!e||o))return a.current&&clearTimeout(a.current),a.current=setTimeout(async(e,t,n)=>{e.current=null;let r=Date.now();r-t.current<tt||await Ue()&&(t.current=r,n({key:$e,text:`Image in clipboard · ${_(`chat:imagePaste`,`Chat`,`ctrl+v`)} to paste`,priority:`immediate`,timeoutMs:8e3}))},et,a,i,n),()=>{a.current&&(clearTimeout(a.current),a.current=null)}},[e,t,n])}var L,$e,et,tt,nt=t((()=>{L=n(O(),1),Oe(),v(),Ze(),$e=`clipboard-image-hint`,et=1e3,tt=3e4}));function rt(e,t){switch(t){case`bash`:return`!${e}`;default:return e}}function it(e){return e.startsWith(`!`)?`bash`:`prompt`}function at(e){return it(e)===`prompt`?e:e.slice(1)}function ot(e){return e===`!`}var st=t((()=>{}));function R(e,t=`append`){e.length>0&&(V&&z.length>0?t===`prepend`?z[0]=e+z[0]:z[0]+=e:(z.unshift(e),z.length>mt&&z.pop()),V=!0,U=!1)}function ct(){return z[0]??``}function lt(){V=!1}function ut(e,t){ht=e,H=t,U=!0,B=0}function dt(){return!U||z.length<=1?null:(B=(B+1)%z.length,{text:z[B]??``,start:ht,length:H})}function ft(e){H=e}function pt(){U=!1}var mt,z,B,V,ht,H,U,gt,W,G,_t,K,q,J,vt,yt=t((()=>{A(),Te(),a(),mt=10,z=[],B=0,V=!1,ht=0,H=0,U=!1,gt=/^[\p{L}\p{N}\p{M}_]$/u,W=/\s/,G=e=>gt.test(e),_t=e=>W.test(e),K=e=>e.length>0&&!_t(e)&&!G(e),q=class e{constructor(e,t=0,n=0){o(this,`measuredText`,void 0),o(this,`selection`,void 0),o(this,`offset`,void 0),this.measuredText=e,this.selection=n,this.offset=Math.max(0,Math.min(this.text.length,t))}static fromText(t,n,r=0,i=0){return new e(new vt(t,n-1),r,i)}getViewportStartLine(e){if(e===void 0||e<=0)return 0;let{line:t}=this.getPosition(),n=this.measuredText.getWrappedText();if(n.length<=e)return 0;let r=Math.floor(e/2),i=Math.max(0,t-r),a=Math.min(n.length,i+e);return a-i<e&&(i=Math.max(0,a-e)),i}getViewportCharOffset(e){let t=this.getViewportStartLine(e);return t===0?0:this.measuredText.getWrappedLines()[t]?.startOffset??0}getViewportCharEnd(e){let t=this.getViewportStartLine(e),n=this.measuredText.getWrappedLines();if(e===void 0||e<=0)return this.text.length;let r=Math.min(n.length,t+e);return r>=n.length?this.text.length:n[r]?.startOffset??this.text.length}render(e,t,n,r,i){let{line:a,column:o}=this.getPosition(),s=this.measuredText.getWrappedText(),c=this.getViewportStartLine(i),l=i!==void 0&&i>0?Math.min(s.length,c+i):s.length;return s.slice(c,l).map((i,l)=>{let u=l+c,d=i;if(t){let e=Array.from(F().segment(i));if(u===s.length-1){let n=Math.min(6,e.length),r=e.length-n,a=e.length>n?e[r].index:0;d=t.repeat(r)+i.slice(a)}else d=t.repeat(e.length)}if(a!==u)return d.trimEnd();let f=``,p=e,m=``,h=0,g=!1;for(let{segment:e}of F().segment(d)){if(g){m+=e;continue}let t=h+S(e);t>o?(p=e,g=!0):(h=t,f+=e)}let _,v=``;if(r&&u===s.length-1&&this.isAtEnd()&&r.text.length>0){let t=Ee(r.text)||r.text[0];_=e?n(t):t;let i=r.text.slice(t.length);i.length>0&&(v=r.dim(i))}else _=e?n(p):p;return f+_+v+m.trimEnd()}).join(`
|
|
2
2
|
`)}left(){if(this.offset===0)return this;let t=this.imageRefEndingAt(this.offset);if(t)return new e(this.measuredText,t.start);let n=this.measuredText.prevOffset(this.offset);return new e(this.measuredText,n)}right(){if(this.offset>=this.text.length)return this;let t=this.imageRefStartingAt(this.offset);if(t)return new e(this.measuredText,t.end);let n=this.measuredText.nextOffset(this.offset);return new e(this.measuredText,Math.min(n,this.text.length))}imageRefEndingAt(e){let t=this.text.slice(0,e).match(/\[Image #\d+\]$/);return t?{start:e-t[0].length,end:e}:null}imageRefStartingAt(e){let t=this.text.slice(e).match(/^\[Image #\d+\]/);return t?{start:e,end:e+t[0].length}:null}snapOutOfImageRef(e,t){let n=/\[Image #\d+\]/g,r;for(;(r=n.exec(this.text))!==null;){let n=r.index,i=n+r[0].length;if(e>n&&e<i)return t===`start`?n:i}return e}up(){let{line:t,column:n}=this.getPosition();if(t===0)return this;let r=this.measuredText.getWrappedText()[t-1];if(r===void 0)return this;let i=S(r);if(n>i){let n=this.getOffset({line:t-1,column:i});return new e(this.measuredText,n,0)}let a=this.getOffset({line:t-1,column:n});return new e(this.measuredText,a,0)}down(){let{line:t,column:n}=this.getPosition();if(t>=this.measuredText.lineCount-1)return this;let r=this.measuredText.getWrappedText()[t+1];if(r===void 0)return this;let i=S(r);if(n>i){let n=this.getOffset({line:t+1,column:i});return new e(this.measuredText,n,0)}let a=this.getOffset({line:t+1,column:n});return new e(this.measuredText,a,0)}startOfCurrentLine(){let{line:t}=this.getPosition();return new e(this.measuredText,this.getOffset({line:t,column:0}),0)}startOfLine(){let{line:t,column:n}=this.getPosition();return n===0&&t>0?new e(this.measuredText,this.getOffset({line:t-1,column:0}),0):this.startOfCurrentLine()}firstNonBlankInLine(){let{line:t}=this.getPosition(),n=(this.measuredText.getWrappedText()[t]||``).match(/^\s*\S/),r=n?.index?n.index+n[0].length-1:0,i=this.getOffset({line:t,column:r});return new e(this.measuredText,i,0)}endOfLine(){let{line:t}=this.getPosition(),n=this.measuredText.getLineLength(t),r=this.getOffset({line:t,column:n});return new e(this.measuredText,r,0)}findLogicalLineStart(e=this.offset){let t=this.text.lastIndexOf(`
|
|
3
3
|
`,e-1);return t===-1?0:t+1}findLogicalLineEnd(e=this.offset){let t=this.text.indexOf(`
|
|
4
4
|
`,e);return t===-1?this.text.length:t}getLogicalLineBounds(){return{start:this.findLogicalLineStart(),end:this.findLogicalLineEnd()}}createCursorWithColumn(t,n,r){let i=n-t,a=t+Math.min(r,i),o=this.measuredText.snapToGraphemeBoundary(a);return new e(this.measuredText,o,0)}endOfLogicalLine(){return new e(this.measuredText,this.findLogicalLineEnd(),0)}startOfLogicalLine(){return new e(this.measuredText,this.findLogicalLineStart(),0)}firstNonBlankInLogicalLine(){let{start:t,end:n}=this.getLogicalLineBounds(),r=t+(this.text.slice(t,n).match(/\S/)?.index??0);return new e(this.measuredText,r,0)}upLogicalLine(){let{start:t}=this.getLogicalLineBounds();if(t===0)return new e(this.measuredText,0,0);let n=this.offset-t,r=t-1,i=this.findLogicalLineStart(r);return this.createCursorWithColumn(i,r,n)}downLogicalLine(){let{start:t,end:n}=this.getLogicalLineBounds();if(n>=this.text.length)return new e(this.measuredText,this.text.length,0);let r=this.offset-t,i=n+1,a=this.findLogicalLineEnd(i);return this.createCursorWithColumn(i,a,r)}nextWord(){if(this.isAtEnd())return this;let t=this.measuredText.getWordBoundaries();for(let n of t)if(n.isWordLike&&n.start>this.offset)return new e(this.measuredText,n.start);return new e(this.measuredText,this.text.length)}endOfWord(){if(this.isAtEnd())return this;let t=this.measuredText.getWordBoundaries();for(let n of t)if(n.isWordLike){if(this.offset>=n.start&&this.offset<n.end-1)return new e(this.measuredText,n.end-1);if(this.offset===n.end-1){for(let n of t)if(n.isWordLike&&n.start>this.offset)return new e(this.measuredText,n.end-1);return this}}for(let n of t)if(n.isWordLike&&n.start>this.offset)return new e(this.measuredText,n.end-1);return this}prevWord(){if(this.isAtStart())return this;let t=this.measuredText.getWordBoundaries(),n=null;for(let r of t)if(r.isWordLike&&r.start<this.offset){if(this.offset>r.start&&this.offset<=r.end)return new e(this.measuredText,r.start);n=r.start}return n===null?new e(this.measuredText,0):new e(this.measuredText,n)}nextVimWord(){if(this.isAtEnd())return this;let t=this.offset,n=e=>this.measuredText.nextOffset(e),r=this.graphemeAt(t);if(!r)return this;if(G(r))for(;t<this.text.length&&G(this.graphemeAt(t));)t=n(t);else if(K(r))for(;t<this.text.length&&K(this.graphemeAt(t));)t=n(t);for(;t<this.text.length&&W.test(this.graphemeAt(t));)t=n(t);return new e(this.measuredText,t)}endOfVimWord(){if(this.isAtEnd())return this;let t=this.text,n=this.offset,r=e=>this.measuredText.nextOffset(e);if(this.graphemeAt(n)===``)return this;for(n=r(n);n<t.length&&W.test(this.graphemeAt(n));)n=r(n);if(n>=t.length)return new e(this.measuredText,t.length);let i=this.graphemeAt(n);if(G(i))for(;n<t.length;){let e=r(n);if(e>=t.length||!G(this.graphemeAt(e)))break;n=e}else if(K(i))for(;n<t.length;){let e=r(n);if(e>=t.length||!K(this.graphemeAt(e)))break;n=e}return new e(this.measuredText,n)}prevVimWord(){if(this.isAtStart())return this;let t=this.offset,n=e=>this.measuredText.prevOffset(e);for(t=n(t);t>0&&W.test(this.graphemeAt(t));)t=n(t);if(t===0&&W.test(this.graphemeAt(0)))return new e(this.measuredText,0);let r=this.graphemeAt(t);if(G(r))for(;t>0;){let e=n(t);if(!G(this.graphemeAt(e)))break;t=e}else if(K(r))for(;t>0;){let e=n(t);if(!K(this.graphemeAt(e)))break;t=e}return new e(this.measuredText,t)}nextWORD(){let e=this;for(;!e.isOverWhitespace()&&!e.isAtEnd();)e=e.right();for(;e.isOverWhitespace()&&!e.isAtEnd();)e=e.right();return e}endOfWORD(){if(this.isAtEnd())return this;let e=this;if(!e.isOverWhitespace()&&(e.right().isOverWhitespace()||e.right().isAtEnd()))return e=e.right(),e.endOfWORD();for(e.isOverWhitespace()&&(e=e.nextWORD());!e.right().isOverWhitespace()&&!e.isAtEnd();)e=e.right();return e}prevWORD(){let e=this;for(e.left().isOverWhitespace()&&(e=e.left());e.isOverWhitespace()&&!e.isAtStart();)e=e.left();if(!e.isOverWhitespace())for(;!e.left().isOverWhitespace()&&!e.isAtStart();)e=e.left();return e}modifyText(t,n=``){let r=this.offset,i=t.offset,a=this.text.slice(0,r)+n+this.text.slice(i);return e.fromText(a,this.columns,r+n.normalize(`NFC`).length)}insert(e){return this.modifyText(this,e)}del(){return this.isAtEnd()?this:this.modifyText(this.right())}backspace(){return this.isAtStart()?this:this.left().modifyText(this)}deleteToLineStart(){if(this.offset>0&&this.text[this.offset-1]===`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Cp as t,Ip as n,Lp as r,Sp as i,_b as a,_i as o,bb as s,gb as c,hb as l,hi as u,mb as d,vp as f,wp as p,yp as m,zp as h}from"./loadAgentsDir-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Cp as t,Ip as n,Lp as r,Sp as i,_b as a,_i as o,bb as s,gb as c,hb as l,hi as u,mb as d,vp as f,wp as p,yp as m,zp as h}from"./loadAgentsDir-B0Anodo0.js";import{D as g,H as _,I as v,P as y,T as b,U as x,V as S,Wt as C,Xt as w,ot as T,t as E}from"./src-DL3w8VPk.js";import{t as D}from"./jsx-runtime-Bb4Xn-E0.js";import{b as O,h as k}from"./settings-B2jvL8Dp.js";import{n as A,t as j}from"./useExitOnCtrlCDWithKeybindings-BKwzUpgb.js";import{t as M}from"./select-DIxfl_VN.js";import{t as N}from"./CustomSelect-wmZ9jz0W.js";function P({onThemeSelect:e,showIntroText:n=!1,helpText:a=``,showHelpTextBelow:o=!1,hideEscToCancel:s=!1,skipExitHandling:l=!1,onCancel:d}){let[p]=_(),m=x(),{columns:E}=T(),D=i(),k=D===null?t(p):null,{setPreviewTheme:j,savePreview:N,cancelPreview:P}=S(),I=r(e=>e.settings.syntaxHighlightingDisabled)??!1,L=h();w(`ThemePicker`);let R=c(`theme:toggleSyntaxHighlighting`,`ThemePicker`,`ctrl+t`);C(`theme:toggleSyntaxHighlighting`,()=>{if(D===null){let e=!I;O(`userSettings`,{syntaxHighlightingDisabled:e}),L(t=>({...t,settings:{...t.settings,syntaxHighlightingDisabled:e}}))}},{context:`ThemePicker`});let z=A(l?()=>{}:void 0),B=[{label:`Dark mode`,value:`dark`},{label:`Light mode`,value:`light`},{label:`Dark mode (colorblind-friendly)`,value:`dark-daltonized`},{label:`Light mode (colorblind-friendly)`,value:`light-daltonized`},{label:`Dark mode (ANSI colors only)`,value:`dark-ansi`},{label:`Light mode (ANSI colors only)`,value:`light-ansi`}],V=(0,F.jsxs)(v,{flexDirection:`column`,gap:1,children:[(0,F.jsxs)(v,{flexDirection:`column`,gap:1,children:[n?(0,F.jsx)(y,{children:`Let's get started.`}):(0,F.jsx)(y,{bold:!0,color:`permission`,children:`Theme`}),(0,F.jsxs)(v,{flexDirection:`column`,children:[(0,F.jsx)(y,{bold:!0,children:`Choose the text style that looks best with your terminal`}),a&&!o&&(0,F.jsx)(y,{dimColor:!0,children:a})]}),(0,F.jsx)(M,{options:B,onFocus:e=>{j(e)},onChange:t=>{N(),e(t)},onCancel:l?()=>{P(),d?.()}:async()=>{P(),await u(0)},visibleOptionCount:B.length,defaultValue:m,defaultFocusValue:m})]}),(0,F.jsxs)(v,{flexDirection:`column`,width:`100%`,children:[(0,F.jsx)(v,{flexDirection:`column`,borderTop:!0,borderBottom:!0,borderLeft:!1,borderRight:!1,borderStyle:`dashed`,borderColor:`subtle`,children:(0,F.jsx)(f,{patch:{oldStart:1,newStart:1,oldLines:3,newLines:3,lines:[` function greet() {`,`- console.log("Hello, World!");`,`+ console.log("Hello, Work Mate!");`,` }`]},dim:!1,filePath:`demo.js`,firstLine:null,width:E})}),(0,F.jsxs)(y,{dimColor:!0,children:[` `,D===`env`?`Syntax highlighting disabled (via CLAUDE_CODE_SYNTAX_HIGHLIGHT=${process.env.CLAUDE_CODE_SYNTAX_HIGHLIGHT})`:I?`Syntax highlighting disabled (${R} to enable)`:k?`Syntax theme: ${k.theme}${k.source?` (from ${k.source})`:``} (${R} to disable)`:`Syntax highlighting enabled (${R} to disable)`]})]})]});return n?V:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(v,{flexDirection:`column`,children:V}),(0,F.jsxs)(v,{marginTop:1,children:[o&&a&&(0,F.jsx)(v,{marginLeft:3,children:(0,F.jsx)(y,{dimColor:!0,children:a})}),!s&&(0,F.jsx)(v,{children:(0,F.jsx)(y,{dimColor:!0,italic:!0,children:z.pending?(0,F.jsxs)(F.Fragment,{children:[`Press `,z.keyName,` again to exit`]}):(0,F.jsxs)(b,{children:[(0,F.jsx)(g,{shortcut:`Enter`,action:`select`}),(0,F.jsx)(g,{shortcut:`Esc`,action:`cancel`})]})})})]})]})}var F,I=e((()=>{j(),s(),E(),a(),d(),l(),n(),o(),k(),N(),p(),m(),F=D()}));export{I as n,P as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Dv as t,Nm as n,Pm as r,Tv as i,_i as a,gi as o,mb as s}from"./loadAgentsDir-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Dv as t,Nm as n,Pm as r,Tv as i,_i as a,gi as o,mb as s}from"./loadAgentsDir-B0Anodo0.js";import{I as c,P as l,Wt as u,ai as d,t as f}from"./src-DL3w8VPk.js";import{t as p}from"./jsx-runtime-Bb4Xn-E0.js";import{It as m,Rn as h}from"./state-B4jiUise.js";import{n as g,t as _}from"./cwd-Pa83R95t.js";import{f as v,u as y}from"./debug-Bglx1aTu.js";import{h as b,s as x}from"./settings-B2jvL8Dp.js";import{g as S,n as C,p as w}from"./config-C-Y2qtB2.js";import{n as T,r as E}from"./analytics-DJobLaWP.js";import{in as D}from"./prompt-CJ1l3XXk.js";import{n as O,t as k}from"./useExitOnCtrlCDWithKeybindings-BKwzUpgb.js";import{t as A}from"./select-DIxfl_VN.js";import{t as j}from"./CustomSelect-wmZ9jz0W.js";import{n as M,t as N}from"./PermissionDialog-BaibiQae.js";import{n as P,t as F}from"./managedEnvConstants-BPwL2aWI.js";import{homedir as I}from"os";var L=e(d(),1),R=p();f(),m(),g(),v(),T(),w(),s(),t(),a(),k(),j(),M(),b(),D(),P(),r();function z(e){if(e===null||e.disableAllHooks)return!1;if(e.statusLine||e.fileSuggestion)return!0;if(!e.hooks)return!1;for(let t of Object.values(e.hooks))if(t.length>0)return!0;return!1}function B(){let e=[];return z(x(`projectSettings`))&&e.push(`.workmate/settings.json`),z(x(`localSettings`))&&e.push(`.workmate/settings.local.json`),e}function V(e){return e.some(e=>e.ruleBehavior===`allow`&&(e.ruleValue.toolName===`Bash`||e.ruleValue.toolName.startsWith(`Bash(`)))}function H(){let e=[];return V(n(`projectSettings`))&&e.push(`.workmate/settings.json`),V(n(`localSettings`))&&e.push(`.workmate/settings.local.json`),e}function U(e){return e?.env?Object.keys(e.env).some(e=>!F.has(e.toUpperCase())):!1}function W(){let e=[];return U(x(`projectSettings`))&&e.push(`.workmate/settings.json`),U(x(`localSettings`))&&e.push(`.workmate/settings.local.json`),e}D();function G({onDone:e,commands:t}){let{servers:n}=i(`project`),r=Object.keys(n).length>0,a=B().length>0,s=H(),d=W().length>0,f=t?.some(e=>e.type===`prompt`&&e.loadedFrom===`commands_DEPRECATED`&&(e.source===`projectSettings`||e.source===`localSettings`)&&e.allowedTools?.some(e=>e===`Bash`||e.startsWith(`Bash(`)))??!1,p=t?.some(e=>e.type===`prompt`&&(e.loadedFrom===`skills`||e.loadedFrom===`plugin`)&&(e.source===`projectSettings`||e.source===`localSettings`||e.source===`plugin`)&&e.allowedTools?.some(e=>e===`Bash`||e.startsWith(`Bash(`)))??!1,m=s.length>0||f||p,g=C(),[v,b]=L.useState(null);L.useEffect(()=>{if(v!==null){let e=v,t=setTimeout(()=>o(e));return()=>clearTimeout(t)}},[v]),L.useEffect(()=>{E(`tengu_trust_dialog_shown`,{isHomeDir:I()===_(),hasMcpServers:r,hasHooks:a,hasBashExecution:m,hasDangerousEnvVars:d})},[r,a,m,d]);function x(t){if(t===`exit`){b(1);return}let n=I()===_();E(`tengu_trust_dialog_accept`,{isHomeDir:n,hasMcpServers:r,hasHooks:a,hasBashExecution:m,hasDangerousEnvVars:d}),n?h(!0):S(e=>({...e,hasTrustDialogAccepted:!0})),e()}let w=O(()=>b(1));return u(`confirm:no`,()=>{b(0)},{context:`Confirmation`}),v===null?g?(setTimeout(e),null):(0,R.jsx)(N,{color:`warning`,titleColor:`warning`,title:`Accessing workspace:`,children:(0,R.jsxs)(c,{flexDirection:`column`,gap:1,paddingTop:1,children:[(0,R.jsx)(l,{bold:!0,children:y().cwd()}),(0,R.jsx)(l,{children:`Is this a project you trust? (Your own code, a well-known open source project, or work from your team).`}),(0,R.jsx)(l,{children:`Once trusted, Work Mate can read, edit, and run commands in this folder.`}),(0,R.jsx)(A,{options:[{label:`Yes, I trust this folder`,value:`enable_all`},{label:`No, exit`,value:`exit`}],onChange:e=>x(e),onCancel:()=>x(`exit`)}),(0,R.jsx)(l,{dimColor:!0,children:w.pending?(0,R.jsxs)(R.Fragment,{children:[`Press `,w.keyName,` again to exit`]}):(0,R.jsx)(R.Fragment,{children:`Enter to confirm · Esc to cancel`})})]})}):null}export{G as TrustDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{IC as t,LC as n}from"./loadAgentsDir-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{IC as t,LC as n}from"./loadAgentsDir-B0Anodo0.js";import{Ar as r,jr as i}from"./state-B4jiUise.js";function a(e,t){return function(n,r){if(n==null)return n;if(!i(n))return e(n,r);for(var a=n.length,o=t?a:-1,s=Object(n);(t?o--:++o<a)&&r(s[o],o,s)!==!1;);return n}}var o=e((()=>{r()})),s,c=e((()=>{n(),o(),s=a(t)}));export{c as n,s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./figures-5ThXQEtq.js";import{Am as i,Em as a,F as o,N as s,P as c,gC as l,km as u,nb as d,rb as f,yC as p}from"./loadAgentsDir-
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./figures-5ThXQEtq.js";import{Am as i,Em as a,F as o,N as s,P as c,gC as l,km as u,nb as d,rb as f,yC as p}from"./loadAgentsDir-B0Anodo0.js";import{I as m,P as h,ai as g,di as _,fi as v,t as y}from"./src-DL3w8VPk.js";import{t as b}from"./jsx-runtime-Bb4Xn-E0.js";import{It as x,Yt as S,h as C}from"./state-B4jiUise.js";import{n as w,t as T}from"./AddWorkspaceDirectory-Ch8IcWXO.js";function E({message:e,args:t,onDone:n}){return(0,O.useEffect)(()=>{let e=setTimeout(n,0);return()=>clearTimeout(e)},[n]),(0,k.jsxs)(m,{flexDirection:`column`,children:[(0,k.jsxs)(h,{dimColor:!0,children:[r.pointer,` /add-dir `,t]}),(0,k.jsx)(d,{children:(0,k.jsx)(h,{children:e})})]})}async function D(e,t,n){let r=(n??``).trim(),c=t.getAppState(),u=async(n,r=!1)=>{let o={type:`addDirectories`,directories:[n],destination:r?`localSettings`:`session`},s=a(t.getAppState().toolPermissionContext,o);t.setAppState(e=>({...e,toolPermissionContext:s}));let c=C();c.includes(n)||S([...c,n]),l.refreshConfig();let u;if(r)try{i(o),u=`Added ${_.bold(n)} as a working directory and saved to local settings`}catch(e){u=`Added ${_.bold(n)} as a working directory. Failed to save to local settings: ${e instanceof Error?e.message:`Unknown error`}`}else u=`Added ${_.bold(n)} as a working directory for this session`;e(`${u} ${_.dim(`· /permissions to manage`)}`)};if(!r)return(0,k.jsx)(T,{permissionContext:c.toolPermissionContext,onAddDirectory:u,onCancel:()=>{e(`Did not add a working directory.`)}});let d=await o(r,c.toolPermissionContext);if(d.resultType!==`success`){let t=s(d);return(0,k.jsx)(E,{message:t,args:n??``,onDone:()=>e(t)})}return(0,k.jsx)(T,{directoryPath:d.absolutePath,permissionContext:c.toolPermissionContext,onAddDirectory:u,onCancel:()=>{e(`Did not add ${_.bold(d.absolutePath)} as a working directory.`)}})}var O,k;e((()=>{v(),n(),O=t(g(),1),x(),f(),w(),y(),u(),p(),c(),k=b()}))();export{D as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Bd as t,Vd as n}from"./loadAgentsDir-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Bd as t,Vd as n}from"./loadAgentsDir-B0Anodo0.js";import{cn as r,ln as i}from"./settings-B2jvL8Dp.js";function a(e,t){let n=new Map;for(let e of t)n.set(e.agentType,e);let r=new Set,i=[];for(let t of e){let e=`${t.agentType}:${t.source}`;if(r.has(e))continue;r.add(e);let a=n.get(t.agentType),o=a&&a.source!==t.source?a.source:void 0;i.push({...t,overriddenBy:o})}return i}function o(e){let n=e.model||t();if(n)return n===`inherit`?`inherit`:n}function s(e){return r(e).toLowerCase()}function c(e,t){return e.agentType.localeCompare(t.agentType,void 0,{sensitivity:`base`})}var l,u=e((()=>{n(),i(),l=[{label:`User agents`,source:`userSettings`},{label:`Project agents`,source:`projectSettings`},{label:`Local agents`,source:`localSettings`},{label:`Managed agents`,source:`policySettings`},{label:`Plugin agents`,source:`plugin`},{label:`CLI arg agents`,source:`flagSettings`},{label:`Built-in agents`,source:`built-in`}]}));export{o as a,u as i,c as n,a as o,s as r,l as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{i as n,o as r}from"./envUtils-DfkgIdYf.js";import{n as i,t as a}from"./figures-5ThXQEtq.js";import{$y as o,Ad as s,Au as c,Cl as l,Dd as u,Ec as d,El as f,Fw as p,Gf as m,Ip as h,Iw as g,Kf as _,Lf as ee,Ll as v,Lp as te,Md as y,Mh as ne,Mu as re,Nd as ie,Nh as ae,Od as oe,Of as se,Pd as ce,Pw as le,Q as ue,Qy as de,RC as fe,Rd as pe,Rf as me,Rl as he,Tc as ge,Tl as _e,Uf as ve,Vd as ye,Wf as be,X as xe,Xf as Se,Yi as Ce,Zf as we,_v as Te,aC as Ee,ay as De,c as Oe,cd as ke,da as Ae,et as je,gv as Me,iy as Ne,jd as Pe,ju as Fe,kd as Ie,kf as Le,ku as Re,l as ze,mb as b,md as x,nt as Be,ny as Ve,o as He,oy as Ue,pS as We,pd as S,qg as Ge,r as Ke,ry as qe,s as Je,t as Ye,ty as Xe,ud as Ze,wl as Qe,zC as $e,zd as et,zp as tt}from"./loadAgentsDir-
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{i as n,o as r}from"./envUtils-DfkgIdYf.js";import{n as i,t as a}from"./figures-5ThXQEtq.js";import{$y as o,Ad as s,Au as c,Cl as l,Dd as u,Ec as d,El as f,Fw as p,Gf as m,Ip as h,Iw as g,Kf as _,Lf as ee,Ll as v,Lp as te,Md as y,Mh as ne,Mu as re,Nd as ie,Nh as ae,Od as oe,Of as se,Pd as ce,Pw as le,Q as ue,Qy as de,RC as fe,Rd as pe,Rf as me,Rl as he,Tc as ge,Tl as _e,Uf as ve,Vd as ye,Wf as be,X as xe,Xf as Se,Yi as Ce,Zf as we,_v as Te,aC as Ee,ay as De,c as Oe,cd as ke,da as Ae,et as je,gv as Me,iy as Ne,jd as Pe,ju as Fe,kd as Ie,kf as Le,ku as Re,l as ze,mb as b,md as x,nt as Be,ny as Ve,o as He,oy as Ue,pS as We,pd as S,qg as Ge,r as Ke,ry as qe,s as Je,t as Ye,ty as Xe,ud as Ze,wl as Qe,zC as $e,zd as et,zp as tt}from"./loadAgentsDir-B0Anodo0.js";import{C as nt,D as C,I as w,P as T,T as E,Wt as D,ai as O,di as rt,fi as it,t as k,y as at}from"./src-DL3w8VPk.js";import{t as A}from"./jsx-runtime-Bb4Xn-E0.js";import{n as ot,t as st}from"./cwd-Pa83R95t.js";import{H as ct,I as lt,N as ut,S as dt,V as ft,Y as pt,x as mt}from"./debug-Bglx1aTu.js";import{Hn as ht,Qt as gt,Vn as _t,Xt as vt,Z as yt,it as bt,ln as xt,q as St,rt as Ct,sn as wt}from"./settings-B2jvL8Dp.js";import{A as Tt,O as Et}from"./config-C-Y2qtB2.js";import{o as Dt,s as Ot}from"./log-D2TIwHBV.js";import{l as kt,n as At,o as jt}from"./stringUtils-C718f5ey.js";import{n as Mt,r as Nt}from"./analytics-DJobLaWP.js";import{S as Pt,_ as Ft}from"./startupProfiler-CJdr3SxP.js";import{_n as It,vn as Lt}from"./prompt-CJ1l3XXk.js";import{a as Rt,i as zt,n as Bt,o as Vt,r as Ht,t as Ut}from"./agentDisplay-M4pfwbMC.js";import{n as Wt,t as Gt}from"./TextInput-B8ruWRf2.js";import{n as Kt,t as qt}from"./useExitOnCtrlCDWithKeybindings-BKwzUpgb.js";import{n as Jt,t as Yt}from"./select-DIxfl_VN.js";import{r as Xt,t as Zt}from"./Spinner-ByQXTvAA.js";import{n as Qt,t as $t}from"./useMergedTools-CCgnBJzO.js";import{n as en,r as tn,t as nn}from"./promptEditor-DoGHJN_W.js";import{n as rn,t as an}from"./useMainLoopModel-DxvV70Ru.js";import{join as j}from"path";import{mkdir as on,open as sn,unlink as cn}from"fs/promises";var M,ln=e((()=>{M={FOLDER_NAME:`.workmate`,AGENTS_DIR:`agents`}}));function un(e,t,n,r,i,a,o){return`---
|
|
2
2
|
name: ${e}
|
|
3
3
|
description: "${t.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`).replace(/\n/g,`\\\\n`)}"${n===void 0||n.length===1&&n[0]===`*`?``:`\ntools: ${n.join(`, `)}`}${a?`\nmodel: ${a}`:``}${i?`\ncolor: ${i}`:``}${o?`\nmemory: ${o}`:``}
|
|
4
4
|
---
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e,o as t,r as n}from"./loadAgentsDir-
|
|
1
|
+
import{i as e,o as t,r as n}from"./loadAgentsDir-B0Anodo0.js";import{n as r,t as i}from"./cwd-Pa83R95t.js";import{a,i as o,n as s,o as c,r as l,t as u}from"./agentDisplay-M4pfwbMC.js";o(),t(),r();function d(e){let t=a(e),n=[e.agentType];return t&&n.push(t),e.memory&&n.push(`${e.memory} memory`),n.join(` · `)}async function f(){let{allAgents:t}=await e(i()),r=c(t,n(t)),a=[],o=0;for(let{label:e,source:t}of u){let n=r.filter(e=>e.source===t).sort(s);if(n.length!==0){a.push(`${e}:`);for(let e of n)if(e.overriddenBy){let t=l(e.overriddenBy);a.push(` (shadowed by ${t}) ${d(e)}`)}else a.push(` ${d(e)}`),o++;a.push(``)}}a.length===0?console.log(`No agents found.`):(console.log(`${o} active agents\n`),console.log(a.join(`
|
|
2
2
|
`).trimEnd()))}export{f as agentsHandler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Dv as t,Tv as n}from"./loadAgentsDir-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Dv as t,Tv as n}from"./loadAgentsDir-B0Anodo0.js";import{h as r,l as i}from"./settings-B2jvL8Dp.js";function a(){let e=i(),t=[`user`,`project`,`local`].flatMap(e=>n(e).errors);return{settings:e.settings,errors:[...e.errors,...t]}}var o=e((()=>{t(),r()}));export{o as n,a as t};
|
package/dist/chunks/{backgroundHousekeeping-CVNIhQg8.js → backgroundHousekeeping-Bq3LMsVR.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,o as t}from"./envUtils-DfkgIdYf.js";import{Eb as n,Jd as r,Jx as i,Lu as a,Pu as o,Q as s,X as c,Yi as l,Yx as ee,_r as u,aC as te,nc as d,ny as ne,pS as re,qg as f,rc as p,sr as m,ty as h,ut as g,wb as ie,xt as ae}from"./loadAgentsDir-
|
|
1
|
+
import{i as e,o as t}from"./envUtils-DfkgIdYf.js";import{Eb as n,Jd as r,Jx as i,Lu as a,Pu as o,Q as s,X as c,Yi as l,Yx as ee,_r as u,aC as te,nc as d,ny as ne,pS as re,qg as f,rc as p,sr as m,ty as h,ut as g,wb as ie,xt as ae}from"./loadAgentsDir-B0Anodo0.js";import{B as _,F as v,It as y}from"./state-B4jiUise.js";import{n as oe,t as se}from"./cwd-Pa83R95t.js";import{I as b,V as x,c as S,f as C,i as w,u as T,x as E}from"./debug-Bglx1aTu.js";import{d as D,h as O,v as k}from"./settings-B2jvL8Dp.js";import{b as A}from"./config-C-Y2qtB2.js";import{_ as j,o as M,s as N,v as P}from"./log-D2TIwHBV.js";import{n as F,r as I}from"./analytics-DJobLaWP.js";import{d as L,l as R}from"./model-BvQFFOf8.js";import{_n as z,vn as B}from"./prompt-CJ1l3XXk.js";import{r as V,t as H}from"./pasteStore-P0zP-ch0.js";import{r as U}from"./magicDocs-Bkz7ZcmL.js";import{i as W,t as G}from"./nativeInstaller-CdjmE9Zy.js";import{n as K,t as ce}from"./allErrors-BF73lon8.js";import{n as le,t as ue}from"./pluginAutoupdate-ennb9k8_.js";import{n as de}from"./registerProtocol-CAsDme_E.js";import"os";import{join as q}from"path";import"crypto";t(),y(),oe(),E(),C(),w(),P(),O(),B(),L(),p(),u(),U(),c(),M(),b(),l(),f(),c(),ne(),b(),M(),l(),f(),r();async function fe(e,t){if(!e)return;let{join:n}=await import(`path`),r=await import(`fs/promises`),a=n(se(),`.workmate`,`skills`,e,`SKILL.md`),o;try{o=await r.readFile(a,`utf-8`)}catch{N(Error(`Failed to read skill file for improvement: ${a}`));return}let c=t.map(e=>`- ${e.section}: ${e.change}`).join(`
|
|
2
2
|
`),l=R(),u=await s({messages:[re({content:`You are editing a skill definition file. Apply the following improvements to the skill.
|
|
3
3
|
|
|
4
4
|
<current_skill_file>
|
|
@@ -14,4 +14,4 @@ Rules:
|
|
|
14
14
|
- Preserve frontmatter (--- block) exactly as-is
|
|
15
15
|
- Preserve the overall format and style
|
|
16
16
|
- Do not remove existing content unless an improvement explicitly replaces it
|
|
17
|
-
- Output the complete updated file inside <updated_file> tags`})],systemPrompt:te([`You edit skill definition files to incorporate user preferences. Output only the updated file content.`]),thinkingConfig:{type:`disabled`},tools:[],signal:h().signal,options:{getToolPermissionContext:async()=>z(),model:l,toolChoice:void 0,isNonInteractiveSession:!1,hasAppendSystemPrompt:!1,temperatureOverride:0,agents:[],querySource:`skill_improvement_apply`,mcpTools:[]}}),d=i(ee(Array.isArray(u.message.content)?u.message.content:[]).trim(),`updated_file`);if(!d){N(Error(`Skill improvement apply: no updated_file tag in response`));return}try{await r.writeFile(a,d,`utf-8`)}catch(e){N(x(e))}}F(),a(),A(),M(),G(),V(),K(),n(),ae();var pe=30;function J(){let e=((D()||{}).cleanupPeriodDays??pe)*24*60*60*1e3;return new Date(Date.now()-e)}function me(e,t){return{messages:e.messages+t.messages,errors:e.errors+t.errors}}function he(e){let t=e.split(`.`)[0].replace(/T(\d{2})-(\d{2})-(\d{2})-(\d{3})Z/,`T$1:$2:$3.$4Z`);return new Date(t)}async function Y(e,t,n){let r={messages:0,errors:0};try{let i=await T().readdir(e);for(let a of i)try{he(a.name)<t&&(await T().unlink(q(e,a.name)),n?r.messages++:r.errors++)}catch(e){N(e)}}catch(e){e instanceof Error&&`code`in e&&e.code!==`ENOENT`&&N(e)}return r}async function ge(){let e=T(),t=J(),n=j.errors(),r=j.baseLogs(),i=await Y(n,t,!1);try{let n;try{n=await e.readdir(r)}catch{return i}let a=n.filter(e=>e.isDirectory()&&e.name.startsWith(`mcp-logs-`)).map(e=>q(r,e.name));for(let n of a)i=me(i,await Y(n,t,!0)),await Z(n,e)}catch(e){e instanceof Error&&`code`in e&&e.code!==`ENOENT`&&N(e)}return i}async function X(e,t,n){return(await n.stat(e)).mtime<t?(await n.unlink(e),!0):!1}async function Z(e,t){try{await t.rmdir(e)}catch{}}async function _e(){let e=J(),t={messages:0,errors:0},n=m(),r=T(),i;try{i=await r.readdir(n)}catch{return t}for(let a of i){if(!a.isDirectory())continue;let i=q(n,a.name),o;try{o=await r.readdir(i)}catch{t.errors++;continue}for(let n of o)if(n.isFile()){if(!n.name.endsWith(`.jsonl`)&&!n.name.endsWith(`.cast`))continue;try{await X(q(i,n.name),e,r)&&t.messages++}catch{t.errors++}}else if(n.isDirectory()){let a=q(i,n.name),o=q(a,ie),s;try{s=await r.readdir(o)}catch{await Z(a,r);continue}for(let n of s)if(n.isFile())try{await X(q(o,n.name),e,r)&&t.messages++}catch{t.errors++}else if(n.isDirectory()){let i=q(o,n.name),a;try{a=await r.readdir(i)}catch{continue}for(let n of a)if(n.isFile())try{await X(q(i,n.name),e,r)&&t.messages++}catch{t.errors++}await Z(i,r)}await Z(o,r),await Z(a,r)}await Z(i,r)}return t}async function Q(e,t,n=!0){let r=J(),i={messages:0,errors:0},a=T(),o;try{o=await a.readdir(e)}catch{return i}for(let n of o)if(!(!n.isFile()||!n.name.endsWith(t)))try{await X(q(e,n.name),r,a)&&i.messages++}catch{i.errors++}return n&&await Z(e,a),i}function ve(){return Q(q(e(),`plans`),`.md`)}async function ye(){let t=J(),n={messages:0,errors:0},r=T();try{let i=q(e(),`file-history`),a;try{a=await r.readdir(i)}catch{return n}let o=a.filter(e=>e.isDirectory()).map(e=>q(i,e.name));await Promise.all(o.map(async e=>{try{(await r.stat(e)).mtime<t&&(await r.rm(e,{recursive:!0,force:!0}),n.messages++)}catch{n.errors++}})),await Z(i,r)}catch(e){N(e)}return n}async function be(){let t=J(),n={messages:0,errors:0},r=T();try{let i=q(e(),`session-env`),a;try{a=await r.readdir(i)}catch{return n}let o=a.filter(e=>e.isDirectory()).map(e=>q(i,e.name));for(let e of o)try{(await r.stat(e)).mtime<t&&(await r.rm(e,{recursive:!0,force:!0}),n.messages++)}catch{n.errors++}await Z(i,r)}catch(e){N(e)}return n}async function xe(){let t=J(),n={messages:0,errors:0},r=T(),i=q(e(),`debug`),a;try{a=await r.readdir(i)}catch{return n}for(let e of a)if(!(!e.isFile()||!e.name.endsWith(`.txt`)||e.name===`latest`))try{await X(q(i,e.name),t,r)&&n.messages++}catch{n.errors++}return n}async function Se(){let{errors:e}=ce();if(e.length>0&&k(`cleanupPeriodDays`)){S(`Skipping cleanup: settings have validation errors but cleanupPeriodDays was explicitly set. Fix settings errors to enable cleanup.`);return}await ge(),await _e(),await ve(),await ye(),await be(),await xe(),await o(),await H(J());let t=await g(J());t>0&&I(`tengu_worktree_cleanup`,{removed:t})}y(),G(),le();var $=600*1e3;function Ce(){import(`./extractMemories-
|
|
17
|
+
- Output the complete updated file inside <updated_file> tags`})],systemPrompt:te([`You edit skill definition files to incorporate user preferences. Output only the updated file content.`]),thinkingConfig:{type:`disabled`},tools:[],signal:h().signal,options:{getToolPermissionContext:async()=>z(),model:l,toolChoice:void 0,isNonInteractiveSession:!1,hasAppendSystemPrompt:!1,temperatureOverride:0,agents:[],querySource:`skill_improvement_apply`,mcpTools:[]}}),d=i(ee(Array.isArray(u.message.content)?u.message.content:[]).trim(),`updated_file`);if(!d){N(Error(`Skill improvement apply: no updated_file tag in response`));return}try{await r.writeFile(a,d,`utf-8`)}catch(e){N(x(e))}}F(),a(),A(),M(),G(),V(),K(),n(),ae();var pe=30;function J(){let e=((D()||{}).cleanupPeriodDays??pe)*24*60*60*1e3;return new Date(Date.now()-e)}function me(e,t){return{messages:e.messages+t.messages,errors:e.errors+t.errors}}function he(e){let t=e.split(`.`)[0].replace(/T(\d{2})-(\d{2})-(\d{2})-(\d{3})Z/,`T$1:$2:$3.$4Z`);return new Date(t)}async function Y(e,t,n){let r={messages:0,errors:0};try{let i=await T().readdir(e);for(let a of i)try{he(a.name)<t&&(await T().unlink(q(e,a.name)),n?r.messages++:r.errors++)}catch(e){N(e)}}catch(e){e instanceof Error&&`code`in e&&e.code!==`ENOENT`&&N(e)}return r}async function ge(){let e=T(),t=J(),n=j.errors(),r=j.baseLogs(),i=await Y(n,t,!1);try{let n;try{n=await e.readdir(r)}catch{return i}let a=n.filter(e=>e.isDirectory()&&e.name.startsWith(`mcp-logs-`)).map(e=>q(r,e.name));for(let n of a)i=me(i,await Y(n,t,!0)),await Z(n,e)}catch(e){e instanceof Error&&`code`in e&&e.code!==`ENOENT`&&N(e)}return i}async function X(e,t,n){return(await n.stat(e)).mtime<t?(await n.unlink(e),!0):!1}async function Z(e,t){try{await t.rmdir(e)}catch{}}async function _e(){let e=J(),t={messages:0,errors:0},n=m(),r=T(),i;try{i=await r.readdir(n)}catch{return t}for(let a of i){if(!a.isDirectory())continue;let i=q(n,a.name),o;try{o=await r.readdir(i)}catch{t.errors++;continue}for(let n of o)if(n.isFile()){if(!n.name.endsWith(`.jsonl`)&&!n.name.endsWith(`.cast`))continue;try{await X(q(i,n.name),e,r)&&t.messages++}catch{t.errors++}}else if(n.isDirectory()){let a=q(i,n.name),o=q(a,ie),s;try{s=await r.readdir(o)}catch{await Z(a,r);continue}for(let n of s)if(n.isFile())try{await X(q(o,n.name),e,r)&&t.messages++}catch{t.errors++}else if(n.isDirectory()){let i=q(o,n.name),a;try{a=await r.readdir(i)}catch{continue}for(let n of a)if(n.isFile())try{await X(q(i,n.name),e,r)&&t.messages++}catch{t.errors++}await Z(i,r)}await Z(o,r),await Z(a,r)}await Z(i,r)}return t}async function Q(e,t,n=!0){let r=J(),i={messages:0,errors:0},a=T(),o;try{o=await a.readdir(e)}catch{return i}for(let n of o)if(!(!n.isFile()||!n.name.endsWith(t)))try{await X(q(e,n.name),r,a)&&i.messages++}catch{i.errors++}return n&&await Z(e,a),i}function ve(){return Q(q(e(),`plans`),`.md`)}async function ye(){let t=J(),n={messages:0,errors:0},r=T();try{let i=q(e(),`file-history`),a;try{a=await r.readdir(i)}catch{return n}let o=a.filter(e=>e.isDirectory()).map(e=>q(i,e.name));await Promise.all(o.map(async e=>{try{(await r.stat(e)).mtime<t&&(await r.rm(e,{recursive:!0,force:!0}),n.messages++)}catch{n.errors++}})),await Z(i,r)}catch(e){N(e)}return n}async function be(){let t=J(),n={messages:0,errors:0},r=T();try{let i=q(e(),`session-env`),a;try{a=await r.readdir(i)}catch{return n}let o=a.filter(e=>e.isDirectory()).map(e=>q(i,e.name));for(let e of o)try{(await r.stat(e)).mtime<t&&(await r.rm(e,{recursive:!0,force:!0}),n.messages++)}catch{n.errors++}await Z(i,r)}catch(e){N(e)}return n}async function xe(){let t=J(),n={messages:0,errors:0},r=T(),i=q(e(),`debug`),a;try{a=await r.readdir(i)}catch{return n}for(let e of a)if(!(!e.isFile()||!e.name.endsWith(`.txt`)||e.name===`latest`))try{await X(q(i,e.name),t,r)&&n.messages++}catch{n.errors++}return n}async function Se(){let{errors:e}=ce();if(e.length>0&&k(`cleanupPeriodDays`)){S(`Skipping cleanup: settings have validation errors but cleanupPeriodDays was explicitly set. Fix settings errors to enable cleanup.`);return}await ge(),await _e(),await ve(),await ye(),await be(),await xe(),await o(),await H(J());let t=await g(J());t>0&&I(`tengu_worktree_cleanup`,{removed:t})}y(),G(),le();var $=600*1e3;function Ce(){import(`./extractMemories-D4Dl1itt.js`).then(({initExtractMemories:e})=>{e()}).catch(()=>{}),d(),ue(),v()&&de();let e=!0;async function t(){if(v()&&_()>Date.now()-1e3*60){setTimeout(t,$).unref();return}if(e&&(e=!1,await Se()),v()&&_()>Date.now()-1e3*60){setTimeout(t,$).unref();return}await W()}setTimeout(t,$).unref()}export{fe as n,Ce as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./backgroundHousekeeping-Bq3LMsVR.js";export{e as startBackgroundHousekeeping};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Cr as t,_r as n,mr as r,or as i,pr as a,si as o,ti as s}from"./loadAgentsDir-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Cr as t,_r as n,mr as r,or as i,pr as a,si as o,ti as s}from"./loadAgentsDir-B0Anodo0.js";import{l as c,u as l}from"./types-Dx7P7JLQ.js";import{It as u,J as d,st as f}from"./state-B4jiUise.js";import{C as p,x as m}from"./debug-Bglx1aTu.js";import{i as h,o as g}from"./stringUtils-C718f5ey.js";import{n as _,r as v}from"./analytics-DJobLaWP.js";import{randomUUID as y}from"crypto";import{mkdir as b,readFile as x,writeFile as S}from"fs/promises";function C(e){let t=e?.message?.content;if(!t)return`Branched conversation`;let n=typeof t==`string`?t:t.find(e=>e.type===`text`)?.text;return n&&n.replace(/\s+/g,` `).trim().slice(0,100)||`Branched conversation`}async function w(e){let n=y(),o=f(),s=i(d()),c=r(n),u=a();await b(s,{recursive:!0,mode:448});let m;try{m=await x(u)}catch{throw Error(`No conversation to branch`)}if(m.length===0)throw Error(`No conversation to branch`);let h=l(m),g=h.filter(e=>t(e)&&!e.isSidechain),_=h.filter(e=>e.type===`content-replacement`&&e.sessionId===o).flatMap(e=>e.replacements);if(g.length===0)throw Error(`No messages to branch`);let v=null,C=[],w=[];for(let e of g){let t={...e,sessionId:n,parentUuid:v,isSidechain:!1,forkedFrom:{sessionId:o,messageUuid:e.uuid}},r={...e,sessionId:n};w.push(r),C.push(p(t)),e.type!==`progress`&&(v=e.uuid)}if(_.length>0){let e={type:`content-replacement`,sessionId:n,replacements:_};C.push(p(e))}return await S(c,`${C.join(`
|
|
2
2
|
`)}\n`,{encoding:`utf8`,mode:384}),{sessionId:n,title:e,forkPath:c,serializedMessages:w,contentReplacementRecords:_}}async function T(e){let t=`${e} (Branch)`;if((await o(t,{exact:!0})).length===0)return t;let n=await o(`${e} (Branch`),r=new Set([1]),i=RegExp(`^${h(e)} \\(Branch(?: (\\d+))?\\)$`);for(let e of n){let t=e.customTitle?.match(i);t&&(t[1]?r.add(parseInt(t[1],10)):r.add(1))}let a=2;for(;r.has(a);)a++;return`${e} (Branch ${a})`}async function E(e,t,n){let r=n?.trim()||void 0,i=f();try{let{sessionId:n,title:a,forkPath:o,serializedMessages:c,contentReplacementRecords:l}=await w(r),u=new Date,d=C(c.find(e=>e.type===`user`)),f=await T(a??d);await s(n,f,o),v(`tengu_conversation_forked`,{message_count:c.length,has_custom_title:!!a});let p={date:u.toISOString().split(`T`)[0],messages:c,fullPath:o,value:u.getTime(),created:u,modified:u,firstPrompt:d,messageCount:c.length,isSidechain:!1,sessionId:n,customTitle:f,contentReplacements:l},m=a?` "${a}"`:``,h=`Branched conversation${m}. You are now in the branch.${`\nTo resume the original: claude -r ${i}`}`;return t.resume?(await t.resume(n,p,`fork`),e(h,{display:`system`})):e(`Branched conversation${m}. Resume with: /resume ${n}`),null}catch(t){return e(`Failed to branch conversation: ${t instanceof Error?t.message:`Unknown error occurred`}`),null}}e((()=>{u(),_(),c(),n(),m(),g()}))();export{E as call,C as deriveFirstPrompt};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Hs as n,Mh as r,Nh as i,Qx as a,Us as o,Yi as s,aC as c,at as l,bb as u,cd as d,it as f,jh as p,ny as m,qg as h,ty as g,ud as _}from"./loadAgentsDir-
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Hs as n,Mh as r,Nh as i,Qx as a,Us as o,Yi as s,aC as c,at as l,bb as u,cd as d,it as f,jh as p,ny as m,qg as h,ty as g,ud as _}from"./loadAgentsDir-B0Anodo0.js";import{I as v,P as y,ai as b,bn as x,ot as S,t as C,vn as w,xt as T}from"./src-DL3w8VPk.js";import{t as E}from"./jsx-runtime-Bb4Xn-E0.js";import{I as D,M as O}from"./debug-Bglx1aTu.js";import{Ht as k}from"./settings-B2jvL8Dp.js";import{_ as A,p as j}from"./config-C-Y2qtB2.js";import{n as M,t as N}from"./SpinnerGlyph-CmkRUvHe.js";import{n as P,r as F}from"./sideQuestion-D49GsfH7.js";import{i as I,n as L}from"./modalContext-DDZdU1J8.js";function R({question:e,context:t,onDone:n}){let[r,i]=(0,H.useState)(null),[a,o]=(0,H.useState)(null),[s,c]=(0,H.useState)(0),l=(0,H.useRef)(null),{rows:u}=I(S());x(()=>c(e=>e+1),r||a?null:80);function f(e){if(e.key===`escape`||e.key===`return`||e.key===` `||e.ctrl&&(e.key===`c`||e.key===`d`)){e.preventDefault(),n(void 0,{display:`skip`});return}(e.key===`up`||e.ctrl&&e.key===`p`)&&(e.preventDefault(),l.current?.scrollBy(-3)),(e.key===`down`||e.ctrl&&e.key===`n`)&&(e.preventDefault(),l.current?.scrollBy(K))}(0,H.useEffect)(()=>{let n=g();async function r(){try{let r=await F({question:e,cacheSafeParams:await B(t)});n.signal.aborted||(r.response?i(r.response):o(`No response received`))}catch(e){n.signal.aborted||o(O(e)||`Failed to get response`)}}return r(),()=>{n.abort()}},[e,t]);let p=Math.max(5,u-W-G);return(0,U.jsxs)(v,{flexDirection:`column`,paddingLeft:2,marginTop:1,tabIndex:0,autoFocus:!0,onKeyDown:f,children:[(0,U.jsxs)(v,{children:[(0,U.jsxs)(y,{color:`warning`,bold:!0,children:[`/btw`,` `]}),(0,U.jsx)(y,{dimColor:!0,children:e})]}),(0,U.jsx)(v,{marginTop:1,marginLeft:2,maxHeight:p,children:(0,U.jsx)(T,{ref:l,flexDirection:`column`,flexGrow:1,children:a?(0,U.jsx)(y,{color:`error`,children:a}):r?(0,U.jsx)(d,{children:r}):(0,U.jsxs)(v,{children:[(0,U.jsx)(N,{frame:s,messageColor:`warning`}),(0,U.jsx)(y,{color:`warning`,children:`Answering...`})]})})}),(r||a)&&(0,U.jsx)(v,{marginTop:1,children:(0,U.jsxs)(y,{dimColor:!0,children:[`↑`,`/`,`↓`,` to scroll · Space, Enter, or Escape to dismiss`]})})]})}function z(e){let t=e.at(-1);return t?.type===`assistant`&&t.message.stop_reason===null?e.slice(0,-1):e}async function B(e){let t=a(z(e.messages)),i=n();if(i)return{systemPrompt:i.systemPrompt,userContext:i.userContext,systemContext:i.systemContext,toolUseContext:e,forkContextMessages:t};let[o,s,l]=await Promise.all([f(e.options.tools,e.options.mainLoopModel,[],e.options.mcpClients),r(),p()]);return{systemPrompt:c(o),userContext:s,systemContext:l,toolUseContext:e,forkContextMessages:t}}async function V(e,t,n){let r=n?.trim();return r?(A(e=>({...e,btwUseCount:e.btwUseCount+1})),(0,U.jsx)(R,{question:r,context:t,onDone:e})):(e(`Usage: /btw <your question>`,{display:`system`}),null)}var H,U,W,G,K;e((()=>{H=t(b(),1),w(),_(),M(),k(),l(),L(),i(),u(),C(),m(),j(),D(),o(),s(),P(),h(),U=E(),W=5,G=6,K=3}))();export{V as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./caches-DLJ6urv-.js";e();export{t as clearSessionCaches};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Ah as t,Fb as n,Fh as r,Fu as i,G as a,Gi as o,Ib as s,Ih as c,Lu as l,Mh as u,Nh as d,Ni as f,Ph as p,Ud as m,Vi as h,b_ as g,es as _,ig as v,jh as y,og as b,op as x,q as S,sp as C,ts as w,wi as T,xf as E,y_ as D,yf as O}from"./loadAgentsDir-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Ah as t,Fb as n,Fh as r,Fu as i,G as a,Gi as o,Ib as s,Ih as c,Lu as l,Mh as u,Nh as d,Ni as f,Ph as p,Ud as m,Vi as h,b_ as g,es as _,ig as v,jh as y,og as b,op as x,q as S,sp as C,ts as w,wi as T,xf as E,y_ as D,yf as O}from"./loadAgentsDir-B0Anodo0.js";import{It as k,gn as A,l as j}from"./state-B4jiUise.js";import{Ur as M,zr as N}from"./settings-B2jvL8Dp.js";import{a as P,n as F}from"./fileSuggestions-C-9unnoJ.js";import{r as I,t as L}from"./magicDocs-Bkz7ZcmL.js";import{r as R,t as z}from"./detectRepository-CfX8Lc0A.js";function B(e=new Set){let o=e.size>0;u.cache.clear?.(),y.cache.clear?.(),t.cache.clear?.(),r.cache.clear?.(),F(),T(),o||b(),p(null),A(null),E(),w(),g(`session_start`),i(),z(),a(),j(e),N(),h(),C(),L(),n(),import(`./SearchExtraToolsTool-BsSoILFj.js`).then(({clearSearchExtraToolsDescriptionCache:e})=>e()),import(`./loadAgentsDir-BbUR6pqH.js`).then(({clearAgentDefinitionsCache:e})=>e()),import(`./prompt-CgOklk7z.js`).then(({clearPromptCache:e})=>e())}var V=e((()=>{k(),f(),c(),d(),P(),m(),v(),O(),x(),I(),o(),_(),S(),D(),R(),M(),l(),s()}));export{V as n,B as t};
|