@readmagic/workmate 0.0.29 → 0.0.31
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-C0lrhffT.js → AddWorkspaceDirectory-C07tZJZN.js} +1 -1
- package/dist/chunks/{AgentsMdExternalIncludesDialog-Dmjjx4ql.js → AgentsMdExternalIncludesDialog-6_bT7l-8.js} +1 -1
- package/dist/chunks/AgentsMdExternalIncludesDialog-BbSA-E68.js +1 -0
- package/dist/chunks/{App-COz7knHS.js → App--Nvun0sE.js} +1 -1
- package/dist/chunks/{BackgroundTasksDialog-5IkCQ8lN.js → BackgroundTasksDialog-DTWNv4Gc.js} +1 -1
- package/dist/chunks/{BypassPermissionsModeDialog-g1FMGfQF.js → BypassPermissionsModeDialog-CJ6U9Vb2.js} +1 -1
- package/dist/chunks/{CustomSelect-BsEd2To5.js → CustomSelect-uOjgHk8D.js} +1 -1
- package/dist/chunks/{DiffDialog-Cwf8CdxZ.js → DiffDialog-CTFLCtYp.js} +4 -4
- package/dist/chunks/Doctor-Bd0k7Jo7.js +1 -0
- package/dist/chunks/{Doctor-GmT5aeAc.js → Doctor-CgZxiFf3.js} +1 -1
- package/dist/chunks/{ExitFlow-DPgUFqeC.js → ExitFlow-DGqwlF8J.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-Di6HZYDV.js → InvalidConfigDialog-8ZJmSDBO.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-BHL-MERJ.js → InvalidSettingsDialog-B7czkYPj.js} +1 -1
- package/dist/chunks/{KeybindingProviderSetup-eE3o0bfp.js → KeybindingProviderSetup-C8rq4fwQ.js} +1 -1
- package/dist/chunks/{MCPConnectionManager-D-qpUJLV.js → MCPConnectionManager-DbPzbRdc.js} +1 -1
- package/dist/chunks/{MCPToolListView-DtHRw4jQ.js → MCPToolListView-BsO2uWCL.js} +1 -1
- package/dist/chunks/{McpParsingWarnings-ByyErvR3.js → McpParsingWarnings-BIpQ_Dle.js} +1 -1
- package/dist/chunks/{MessageSelector-CFz30wBL.js → MessageSelector-DuCpdn-Q.js} +1 -1
- package/dist/chunks/{Messages-CfY-Oj3M.js → Messages-SKlSLbVo.js} +1 -1
- package/dist/chunks/{Onboarding-BfWLRx3n.js → Onboarding-CLEqdl35.js} +1 -1
- package/dist/chunks/{PromptInputFooterSuggestions-BRyJj7XR.js → PromptInputFooterSuggestions-cu1KF4_b.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-DLuRCXVS.js → PromptInputHelpMenu-MH_gVGmN.js} +1 -1
- package/dist/chunks/{ProviderSetup-CKZGG2B9.js → ProviderSetup-zjQQUmDr.js} +1 -1
- package/dist/chunks/{QueryEngine-B27MOtBA.js → QueryEngine-Cb2ncWE6.js} +1 -1
- package/dist/chunks/REPL-CWbLkb3q.js +124 -0
- package/dist/chunks/REPL-D1bn80_0.js +1 -0
- package/dist/chunks/{ResumeConversation-7eURPHmQ.js → ResumeConversation-DRcIMHTE.js} +1 -1
- package/dist/chunks/SearchExtraToolsTool-B6Qlr08G.js +1 -0
- package/dist/chunks/{Settings-4TNYpfUs.js → Settings-B-EscJrZ.js} +2 -2
- package/dist/chunks/{Spinner-BgjmQLjw.js → Spinner-ByYcKk2V.js} +1 -1
- package/dist/chunks/{SpinnerGlyph-BR_SiV9L.js → SpinnerGlyph-4aVLQdJf.js} +1 -1
- package/dist/chunks/{TextInput-BVEWdRz9.js → TextInput-eYxBj_1-.js} +1 -1
- package/dist/chunks/{ThemePicker-th2jdUjh.js → ThemePicker-BqeGU99Q.js} +1 -1
- package/dist/chunks/{TrustDialog-YsYqHyRR.js → TrustDialog-DYZ0i7rH.js} +1 -1
- package/dist/chunks/{ValidationErrorsList-CKeHoN2Z.js → ValidationErrorsList-Cw-sjz1h.js} +1 -1
- package/dist/chunks/{_baseEach-Bz5fQbIq.js → _baseEach-BQ2jM5Sg.js} +1 -1
- package/dist/chunks/{add-dir-BsO6l8Ue.js → add-dir-3q2C-Kfj.js} +1 -1
- package/dist/chunks/{agentDisplay-ChkgiTIH.js → agentDisplay-C18dbK7V.js} +1 -1
- package/dist/chunks/{agents-DqEB6iwV.js → agents--BKL-glS.js} +1 -1
- package/dist/chunks/{agents-BV1nan6b.js → agents-B_Ik_9lY.js} +1 -1
- package/dist/chunks/{allErrors-CkdguCDv.js → allErrors-CJOE7EGx.js} +1 -1
- package/dist/chunks/{appleTerminalBackup-CN8kS74J.js → appleTerminalBackup-j8nI5uNK.js} +1 -1
- package/dist/chunks/backgroundHousekeeping-COON_jRA.js +1 -0
- package/dist/chunks/{backgroundHousekeeping-1VsWy8xd.js → backgroundHousekeeping-FPn2H48W.js} +1 -1
- package/dist/chunks/banner-BsO6K4Ve.js +2 -0
- package/dist/chunks/{branch-CTIHtpwz.js → branch-7SdIl7ZG.js} +1 -1
- package/dist/chunks/bridgeControl-DMUu37uO.js +2 -0
- package/dist/chunks/{btw-BA39Zrhm.js → btw-BhVWw00h.js} +1 -1
- package/dist/chunks/{bundledMode-D9omqD3L.js → bundledMode-Dqe4pz0a.js} +1 -1
- package/dist/chunks/caches-DaOhyHsb.js +1 -0
- package/dist/chunks/caches-DgNr-KX3.js +1 -0
- package/dist/chunks/channel-BNS35qVl.js +2 -0
- package/dist/chunks/{channel-C5yKM1wf.js → channel-DWDK9jut.js} +1 -1
- package/dist/chunks/{clear-BmlaYYrD.js → clear-B5WkPxlz.js} +1 -1
- package/dist/chunks/{client-pA7fKk0-.js → client-D3QmHVeI.js} +1 -1
- package/dist/chunks/client-dTKhXxBT.js +1 -0
- package/dist/chunks/{client-2w-g5kMx.js → client-q_uGYC2E.js} +1 -1
- package/dist/chunks/client-y_U1O4mI.js +1 -0
- package/dist/chunks/commands-DJe5bkNw.js +1 -0
- package/dist/chunks/{compact-D3uePeI7.js → compact-DriVPdmX.js} +1 -1
- package/dist/chunks/config-CMtnYZR9.js +3 -0
- package/dist/chunks/config-CgzzjTUe.js +1 -0
- package/dist/chunks/config-FEF6EcWp.js +1 -0
- package/dist/chunks/{context-CBEWyVpE.js → context-CXi66Ghx.js} +1 -1
- package/dist/chunks/{context-noninteractive-B03nuxfN.js → context-noninteractive-BRoUkLxt.js} +1 -1
- package/dist/chunks/context-noninteractive-Bupgkyt9.js +1 -0
- package/dist/chunks/conversation-CCV0BYD_.js +1 -0
- package/dist/chunks/{conversation-BFL0rEIx.js → conversation-DrEE7olO.js} +1 -1
- package/dist/chunks/{conversationRecovery-Bt84CYO6.js → conversationRecovery-CZzxsT_R.js} +1 -1
- package/dist/chunks/{crossProjectResume-DwlYY6lV.js → crossProjectResume-CbXDWdHE.js} +1 -1
- package/dist/chunks/{debug-2pVES-2G.js → debug-NBJH_NxR.js} +2 -2
- package/dist/chunks/{detectRepository--luIRv5H.js → detectRepository-Bu0he_XM.js} +1 -1
- package/dist/chunks/{diff-CewYzu3Y.js → diff-CH8kHqwX.js} +1 -1
- package/dist/chunks/{directoryCompletion-BC0qRmrz.js → directoryCompletion-CwKPuwrS.js} +1 -1
- package/dist/chunks/doctor-HV7-zZgq.js +1 -0
- package/dist/chunks/{entry-DdVUdGWV.js → entry-CyH0Rkjq.js} +3 -3
- package/dist/chunks/{execFileNoThrow-DXSEj8ZO.js → execFileNoThrow-7Ys9mO27.js} +1 -1
- package/dist/chunks/{exit-QwCo2aJo.js → exit-zYpIKg68.js} +1 -1
- package/dist/chunks/{extraUsage-Cu0aV35i.js → extraUsage-Dp_LtcKE.js} +1 -1
- package/dist/chunks/extractMemories-1_fkJtc-.js +1 -0
- package/dist/chunks/fast-Bi-RRDlf.js +1 -0
- package/dist/chunks/{fast-BlhpCQ2f.js → fast-DnP_x58e.js} +1 -1
- package/dist/chunks/{fetchModelList-DjFCMjVN.js → fetchModelList-BctZn47N.js} +1 -1
- package/dist/chunks/fetchModelList-Dfyy0Yds.js +1 -0
- package/dist/chunks/fileSuggestions-CoYWpIJB.js +3 -0
- package/dist/chunks/{gemini-I-M5_sUA.js → gemini-CyZAw1Wg.js} +1 -1
- package/dist/chunks/{generateSessionName-CJ0sh6HD.js → generateSessionName-CJ13ZLWG.js} +1 -1
- package/dist/chunks/{genericProcessUtils-GqURdVAv.js → genericProcessUtils-XwqvFxyn.js} +1 -1
- package/dist/chunks/{goal-DIrBBT5J.js → goal-CiuF90SO.js} +1 -1
- package/dist/chunks/{grok-ZLjJN6b9.js → grok-B4R78Wy4.js} +1 -1
- package/dist/chunks/{help-CDMjVOl6.js → help-CQ8yZg8_.js} +1 -1
- package/dist/chunks/{history-CUrqO9rV.js → history-PZLMYab7.js} +1 -1
- package/dist/chunks/hooks-Cj3t3ItG.js +1 -0
- package/dist/chunks/{hooks-BNKCE023.js → hooks-DgsxCW0L.js} +1 -1
- package/dist/chunks/{install-xlfTw1j6.js → install-W_2JVR8Y.js} +1 -1
- package/dist/chunks/{instrumentation-DSt0UvGn.js → instrumentation-Yk5dlvD_.js} +3 -3
- package/dist/chunks/{job-BVElGsu0.js → job-CAbdQPkT.js} +1 -1
- package/dist/chunks/{keybindings-CxgQqQJe.js → keybindings-CkiE_uBG.js} +1 -1
- package/dist/chunks/{launchLocalMemory-DUkJCKmd.js → launchLocalMemory-C-KuYLDQ.js} +1 -1
- package/dist/chunks/{launchOnboarding-BvD-E_jC.js → launchOnboarding-2-AEYja0.js} +1 -1
- package/dist/chunks/{loadAgentsDir-BfLCckVj.js → loadAgentsDir-CgDTTnMX.js} +477 -477
- package/dist/chunks/loadAgentsDir-jBY44wEO.js +1 -0
- package/dist/chunks/{loadPluginHooks-BPwWtBzO.js → loadPluginHooks-CWkivYx4.js} +1 -1
- package/dist/chunks/{loader-BMAtuwRa.js → loader-DsEdsMHv.js} +1 -1
- package/dist/chunks/localSearch-B3aRqi3q.js +1 -0
- package/dist/chunks/{localSearch-BHG8sp8p.js → localSearch-BhygSl0K.js} +1 -1
- package/dist/chunks/{log-L1kqxa_P.js → log-D98mO6yJ.js} +1 -1
- package/dist/chunks/{logoUtils-BsNLv-qi.js → logoUtils-rZbHAggC.js} +1 -1
- package/dist/chunks/{magicDocs-Bue9vxzY.js → magicDocs-430IH4o3.js} +1 -1
- package/dist/chunks/{main-U71X4Thd.js → main-DuS6HbbE.js} +17 -17
- package/dist/chunks/managedEnv-BV6T_PdC.js +1 -0
- package/dist/chunks/{managedEnv-EZ2IirNa.js → managedEnv-O3Xqe_lk.js} +1 -1
- package/dist/chunks/{mcp-De3QGKvT.js → mcp-BoJ9rdef.js} +1 -1
- package/dist/chunks/{mcp-C4CxCMwJ.js → mcp-C2GF6Gp7.js} +1 -1
- package/dist/chunks/{mcp-D9HFARDy.js → mcp-XaHs-eh9.js} +1 -1
- package/dist/chunks/{memory-DVRdJFfI.js → memory-D0vG6luI.js} +1 -1
- package/dist/chunks/{mode-Bd5w-RBX.js → mode-4ZXGLC71.js} +1 -1
- package/dist/chunks/model-BidsdFhX.js +1 -0
- package/dist/chunks/{model-BCIcUhrc.js → model-CcgVXT3w.js} +1 -1
- package/dist/chunks/{modelOptions-COIU5U3w.js → modelOptions-Bw53Jebp.js} +1 -1
- package/dist/chunks/{nativeInstaller-CGSNzGNn.js → nativeInstaller-BczAzL96.js} +1 -1
- package/dist/chunks/{notifications-B5gzCmPC.js → notifications-B3v1XAdd.js} +1 -1
- package/dist/chunks/{onChangeAppState-NWwSE-I4.js → onChangeAppState-wASLrUas.js} +1 -1
- package/dist/chunks/{openai-CyJ3m4dI.js → openai-CvSNI6b2.js} +1 -1
- package/dist/chunks/{overlayContext-DYrGDe63.js → overlayContext-0wuZMXWl.js} +1 -1
- package/dist/chunks/{parser-CTnaXFVJ.js → parser-D2kggQDp.js} +1 -1
- package/dist/chunks/parser-DZUcp40d.js +1 -0
- package/dist/chunks/{partition-BavNaw1S.js → partition-CGKLltyv.js} +1 -1
- package/dist/chunks/{pasteStore-njJCBMKr.js → pasteStore-2RafnH7M.js} +1 -1
- package/dist/chunks/{permissions-CLYcBXIu.js → permissions-DawwDdur.js} +1 -1
- package/dist/chunks/{pidLock-Bao7SU6Z.js → pidLock-TOlSC34M.js} +2 -2
- package/dist/chunks/{plan-Dwj_ZX8G.js → plan-D_vIEUQa.js} +1 -1
- package/dist/chunks/{plugin-Cscvf8st.js → plugin-CDWB3AFL.js} +1 -1
- package/dist/chunks/{pluginAutoupdate-D5XyiZrP.js → pluginAutoupdate-CPzXHVsX.js} +1 -1
- package/dist/chunks/{pluginBlocklist-CpkjXXKQ.js → pluginBlocklist-Bu6GP9_C.js} +1 -1
- package/dist/chunks/{pluginCliCommands-DmLsxs1M.js → pluginCliCommands-CNpseXZD.js} +1 -1
- package/dist/chunks/{pluginFlagging-CRuX6sHR.js → pluginFlagging-1MM3zuMP.js} +1 -1
- package/dist/chunks/{pluginOperations-orq3bOCp.js → pluginOperations-qT-GGKNu.js} +1 -1
- package/dist/chunks/pluginStartupCheck-CCDpCchC.js +1 -0
- package/dist/chunks/{pluginStartupCheck-DGDl1WOZ.js → pluginStartupCheck-DXPIrR7f.js} +1 -1
- package/dist/chunks/{plugins-Cq5c-Qs1.js → plugins-Bbbvm9KH.js} +1 -1
- package/dist/chunks/{poorMode-CG2JNTD0.js → poorMode-BvypUTur.js} +1 -1
- package/dist/chunks/poorMode-CP6359Sz.js +1 -0
- package/dist/chunks/print-Db7IDW_T.js +13 -0
- package/dist/chunks/process-CewWh77C.js +1 -0
- package/dist/chunks/process-De2crvt4.js +1 -0
- package/dist/chunks/{processBashCommand-C7oVqf0B.js → processBashCommand-DtEP1Js2.js} +1 -1
- package/dist/chunks/{processSlashCommand-CPQB5_0w.js → processSlashCommand-BIIOr3n4.js} +1 -1
- package/dist/chunks/{projectOnboardingState-D-_ijZnG.js → projectOnboardingState-DqGLXSM_.js} +1 -1
- package/dist/chunks/prompt-CCP82QoX.js +1 -0
- package/dist/chunks/{prompt-DaYH88Oe.js → prompt-CduUPV0s.js} +3 -3
- package/dist/chunks/prompt-DmWyLDH6.js +1 -0
- package/dist/chunks/{promptEditor-14TB3MYt.js → promptEditor-CyMqa_av.js} +1 -1
- package/dist/chunks/{protocolHandler-CJO3CRYW.js → protocolHandler-DrGjosKa.js} +1 -1
- package/dist/chunks/{proxy--_NfbJhm.js → proxy-MzIsnPd7.js} +1 -1
- package/dist/chunks/{reconciler-B5Kr4do0.js → reconciler-DQxjz0OK.js} +1 -1
- package/dist/chunks/{refresh-DurNMJeS.js → refresh-BmkkYKno.js} +1 -1
- package/dist/chunks/{reject-CzjtO3fU.js → reject-DYsU8jkO.js} +1 -1
- package/dist/chunks/{reload-plugins-C38i_Eb3.js → reload-plugins-CmHAxvlA.js} +1 -1
- package/dist/chunks/{rename-BV-3ZpFx.js → rename-BrGuvkvC.js} +1 -1
- package/dist/chunks/{renderOptions-B0RFpjRI.js → renderOptions-B3DyIbF6.js} +1 -1
- package/dist/chunks/{resume-CUzQIor4.js → resume-COSo0ATp.js} +1 -1
- package/dist/chunks/ripgrep-CIIzTaSI.js +1 -0
- package/dist/chunks/{ripgrep-67m14ImZ.js → ripgrep-CnK9qx1e.js} +1 -1
- package/dist/chunks/{runtimeObserver-Ess1Cn8Y.js → runtimeObserver-CoNTwrJ3.js} +1 -1
- package/dist/chunks/{runtimeObserver-BKoQ5IEO.js → runtimeObserver-Dpi40Nfi.js} +2 -2
- package/dist/chunks/sandbox-adapter-D0bQ6nsv.js +1 -0
- package/dist/chunks/{sandbox-toggle-Bp6Xpjh3.js → sandbox-toggle-CrjErH9V.js} +1 -1
- package/dist/chunks/searchExtraTools-_Fo0KDnz.js +1 -0
- package/dist/chunks/{select-Bm29ymsI.js → select-BNeFiLNP.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-BCBV26Ut.js +1 -0
- package/dist/chunks/{sessionObserver-CBlzrJt1.js → sessionObserver-CAvR0MCN.js} +1 -1
- package/dist/chunks/sessionObserver-QbHl_0Dr.js +1 -0
- package/dist/chunks/sessionStorage-CscAodvT.js +1 -0
- package/dist/chunks/{sessionTracing-TDsq54Uc.js → sessionTracing-rMBtalMz.js} +1 -1
- package/dist/chunks/settings-B3WqnPDo.js +1 -0
- package/dist/chunks/{settings-D4M13toi.js → settings-CA-5Px85.js} +2 -2
- package/dist/chunks/setup-X5QOX_BW.js +3 -0
- package/dist/chunks/{shadowedRuleDetection-BG3jtA9Y.js → shadowedRuleDetection-BucAPuXp.js} +1 -1
- package/dist/chunks/{sideQuestion-C8GNVo4R.js → sideQuestion-B1W_L7NR.js} +1 -1
- package/dist/chunks/{sinks-BafJR6Fw.js → sinks-Bqzavjot.js} +1 -1
- package/dist/chunks/sinks-ofVW99nt.js +1 -0
- package/dist/chunks/{skillChangeDetector-CY17weG4.js → skillChangeDetector-jKxXTp4F.js} +1 -1
- package/dist/chunks/{skillGapStore-Cl4J1WoZ.js → skillGapStore-CQVCxlWd.js} +2 -2
- package/dist/chunks/{skillLifecycle-DdfeUHBf.js → skillLifecycle-GGpX7H8W.js} +2 -2
- package/dist/chunks/{skillSearchPanel-DtQYF9gN.js → skillSearchPanel-DDM0zZ_r.js} +2 -2
- package/dist/chunks/{skills-Fd12LJal.js → skills-Bmdrtecu.js} +1 -1
- package/dist/chunks/{sleep-xKMbXTJe.js → sleep-BGewNhNx.js} +1 -1
- package/dist/chunks/{startupProfiler-B9Qv2QGH.js → startupProfiler-C_xcIvEA.js} +1 -1
- package/dist/chunks/startupProfiler-uueg2S43.js +1 -0
- package/dist/chunks/status-CFpCBQX1.js +1 -0
- package/dist/chunks/{statusNoticeHelpers-D0tonVy0.js → statusNoticeHelpers-DRJcaVdx.js} +1 -1
- package/dist/chunks/{stringUtils-Cs6E5f-B.js → stringUtils-CtJhTszO.js} +1 -1
- package/dist/chunks/switcher-BCr3vwnq.js +1 -0
- package/dist/chunks/{switcher-BCq9Az_q.js → switcher-CqGz0hjQ.js} +1 -1
- package/dist/chunks/{tasks-DQmkY_xD.js → tasks-CNQUkXoq.js} +1 -1
- package/dist/chunks/{templateJobs-CEDUbFAY.js → templateJobs-CYArZLti.js} +1 -1
- package/dist/chunks/{terminalSetup-CaGbEVjB.js → terminalSetup-QvvwfSGV.js} +1 -1
- package/dist/chunks/{terminalSetup-xe_P98fY.js → terminalSetup-h_TPZN2E.js} +1 -1
- package/dist/chunks/{theme-DQjJ4R0o.js → theme-DVkXXIPx.js} +1 -1
- package/dist/chunks/{tipRegistry-BwxZ_G0j.js → tipRegistry-DzOyYhJT.js} +2 -2
- package/dist/chunks/{toolEventObserver-DdZ30on9.js → toolEventObserver-BAkhiG0F.js} +1 -1
- package/dist/chunks/{toolPool-CWIXwdX7.js → toolPool-D_7Onp-c.js} +1 -1
- package/dist/chunks/{udsClient-CWeoNrm3.js → udsClient-COYqIvvr.js} +1 -1
- package/dist/chunks/{useExitOnCtrlCDWithKeybindings-ClrtNKJ6.js → useExitOnCtrlCDWithKeybindings-z3RiW9jT.js} +1 -1
- package/dist/chunks/useMainLoopModel-DMB41HoQ.js +1 -0
- package/dist/chunks/{useManagePlugins-CmsPSHor.js → useManagePlugins-DSRLHKH5.js} +1 -1
- package/dist/chunks/{useMergedTools-C8PxReh0.js → useMergedTools-C7wh5W03.js} +1 -1
- package/dist/chunks/{useSearchInput-BZhTzjgN.js → useSearchInput-r534PKo1.js} +1 -1
- package/dist/chunks/{useSettingsErrors-GWIxCYyd.js → useSettingsErrors-DL_ai-el.js} +1 -1
- package/dist/chunks/{util-Bih2g-pV.js → util-DombpJHQ.js} +1 -1
- package/dist/chunks/{validatePlugin-BwcC_Wbr.js → validatePlugin-DU3C7Mvb.js} +1 -1
- package/dist/chunks/vim-BX8ljWbJ.js +1 -0
- package/dist/chunks/worktree-CjnMMjR6.js +1 -0
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/AgentsMdExternalIncludesDialog-DIahWLha.js +0 -1
- package/dist/chunks/Doctor-CcLoI7tF.js +0 -1
- package/dist/chunks/REPL-DMRD5wSN.js +0 -124
- package/dist/chunks/REPL-gzolQvzu.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-BINZTstr.js +0 -1
- package/dist/chunks/backgroundHousekeeping-pMtrl4K2.js +0 -1
- package/dist/chunks/banner-BKOzHotb.js +0 -2
- package/dist/chunks/bridgeControl-C8xaGuwO.js +0 -2
- package/dist/chunks/caches-DHZHqVhf.js +0 -1
- package/dist/chunks/caches-fqs-Y-kW.js +0 -1
- package/dist/chunks/channel-B5FkNSZ3.js +0 -1
- package/dist/chunks/client-B0ngS4Uu.js +0 -1
- package/dist/chunks/client-BP4DOH3K.js +0 -1
- package/dist/chunks/commands-EUcHifS4.js +0 -1
- package/dist/chunks/config-Bio2EjUK.js +0 -3
- package/dist/chunks/config-C_AEhZrn.js +0 -1
- package/dist/chunks/config-GgGdlJ9h.js +0 -1
- package/dist/chunks/context-noninteractive-BLCyyyGL.js +0 -1
- package/dist/chunks/conversation-D-ker4RO.js +0 -1
- package/dist/chunks/doctor-CrQ0UfG2.js +0 -1
- package/dist/chunks/extractMemories-DHlbRc5g.js +0 -1
- package/dist/chunks/fast-C3JeBy3A.js +0 -1
- package/dist/chunks/fetchModelList-L2XarfAj.js +0 -1
- package/dist/chunks/fileSuggestions-BRwKV_KA.js +0 -3
- package/dist/chunks/hooks-ERYtmuNW.js +0 -1
- package/dist/chunks/loadAgentsDir-BImZsKrh.js +0 -1
- package/dist/chunks/localSearch-D3rvcRRC.js +0 -1
- package/dist/chunks/managedEnv-DCGLDTP_.js +0 -1
- package/dist/chunks/model-BIf2i1is.js +0 -1
- package/dist/chunks/parser-Diihup2V.js +0 -1
- package/dist/chunks/pluginStartupCheck-GHO77nmg.js +0 -1
- package/dist/chunks/poorMode-eMIFCAC_.js +0 -1
- package/dist/chunks/print-zo7Z--Ll.js +0 -13
- package/dist/chunks/process-CNfq37LF.js +0 -1
- package/dist/chunks/process-gEbdy6uY.js +0 -1
- package/dist/chunks/prompt-CAzFDybL.js +0 -1
- package/dist/chunks/prompt-Cm8SKZXY.js +0 -1
- package/dist/chunks/ripgrep-DB7KB8RZ.js +0 -1
- package/dist/chunks/sandbox-adapter-ClRO21Ci.js +0 -1
- package/dist/chunks/searchExtraTools-CV_fkuD6.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-B5kAD4ol.js +0 -1
- package/dist/chunks/sessionObserver-CayxkuxO.js +0 -1
- package/dist/chunks/sessionStorage-vLxCo1Mh.js +0 -1
- package/dist/chunks/settings-Dfit5gGT.js +0 -1
- package/dist/chunks/setup-BbyfyeQk.js +0 -3
- package/dist/chunks/sinks-CHtjg7sn.js +0 -1
- package/dist/chunks/startupProfiler-DWcM4QBl.js +0 -1
- package/dist/chunks/status-CGEMRiPI.js +0 -1
- package/dist/chunks/switcher-DQMr6Anx.js +0 -1
- package/dist/chunks/useMainLoopModel-CULw8pB_.js +0 -1
- package/dist/chunks/vim-BlO9V5_5.js +0 -1
- package/dist/chunks/worktree-BB9lFWBB.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Gt as t,H as n,I as r,Lt as i,P as a,ai as o,kt as s,t as c}from"./src-BX54x08P.js";import{t as l}from"./jsx-runtime-Bb4Xn-E0.js";import{Xt as u,qt as d}from"./settings-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Gt as t,H as n,I as r,Lt as i,P as a,ai as o,kt as s,t as c}from"./src-BX54x08P.js";import{t as l}from"./jsx-runtime-Bb4Xn-E0.js";import{Xt as u,qt as d}from"./settings-CA-5Px85.js";import{rb as f}from"./loadAgentsDir-CgDTTnMX.js";import{n as p}from"./analytics-COpjZpvd.js";import{n as m,t as h}from"./useExitOnCtrlCDWithKeybindings-z3RiW9jT.js";import{n as g,t as _}from"./select-BNeFiLNP.js";import{c as v,i as y,s as b}from"./terminalSetup-h_TPZN2E.js";import{r as x}from"./Spinner-ByYcKk2V.js";import{n as S,t as C}from"./ThemePicker-BqeGU99Q.js";import{n as w,t as T}from"./PressEnterToContinue-DE1RxMX_.js";var E=e(o(),1),D=l();p(),u(),f(),h(),y(),c(),c(),x(),g(),c();var O=58;function k(){let[e]=n(),t=`Welcome to Work Mate`;return d.terminal===`Apple_Terminal`?(0,D.jsx)(A,{theme:e,welcomeMessage:t}):[`light`,`light-daltonized`,`light-ansi`].includes(e)?(0,D.jsxs)(r,{width:O,flexDirection:`column`,children:[(0,D.jsxs)(a,{children:[(0,D.jsxs)(a,{color:`workmateBlue_FOR_SYSTEM_SPINNER`,children:[t,` `]}),(0,D.jsxs)(a,{dimColor:!0,children:[`v`,`0.0.31`,` `]})]}),(0,D.jsx)(a,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,D.jsx)(a,{children:` ░░░░░░ `}),(0,D.jsx)(a,{children:` ░░░ ░░░░░░░░░░ `}),(0,D.jsx)(a,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,D.jsx)(a,{children:` `})]}):(0,D.jsxs)(r,{width:O,flexDirection:`column`,children:[(0,D.jsxs)(a,{children:[(0,D.jsxs)(a,{color:`workmateBlue_FOR_SYSTEM_SPINNER`,children:[t,` `]}),(0,D.jsxs)(a,{dimColor:!0,children:[`v`,`0.0.31`,` `]})]}),(0,D.jsx)(a,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,D.jsx)(a,{children:` * █████▓▓░ `}),(0,D.jsx)(a,{children:` * ███▓░ ░░ `}),(0,D.jsx)(a,{children:` ░░░░░░ ███▓░ `}),(0,D.jsx)(a,{children:` ░░░ ░░░░░░░░░░ ███▓░ `}),(0,D.jsxs)(a,{children:[(0,D.jsx)(a,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,D.jsx)(a,{bold:!0,children:`*`}),(0,D.jsx)(a,{children:` ██▓░░ ▓ `})]}),(0,D.jsx)(a,{children:` ░▓▓███▓▓░ `}),(0,D.jsx)(a,{dimColor:!0,children:` * ░░░░ `}),(0,D.jsx)(a,{dimColor:!0,children:` ░░░░░░░░ `}),(0,D.jsx)(a,{dimColor:!0,children:` * ░░░░░░░░░░░░░░░░ `}),(0,D.jsx)(a,{dimColor:!0,children:` * `})]})}function A({theme:e,welcomeMessage:t}){return[`light`,`light-daltonized`,`light-ansi`].includes(e)?(0,D.jsxs)(r,{width:O,flexDirection:`column`,children:[(0,D.jsxs)(a,{children:[(0,D.jsxs)(a,{color:`workmateBlue_FOR_SYSTEM_SPINNER`,children:[t,` `]}),(0,D.jsxs)(a,{dimColor:!0,children:[`v`,`0.0.31`,` `]})]}),(0,D.jsx)(a,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,D.jsx)(a,{children:` ░░░░░░ `}),(0,D.jsx)(a,{children:` ░░░ ░░░░░░░░░░ `}),(0,D.jsx)(a,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,D.jsx)(a,{children:` `})]}):(0,D.jsxs)(r,{width:O,flexDirection:`column`,children:[(0,D.jsxs)(a,{children:[(0,D.jsxs)(a,{color:`workmateBlue_FOR_SYSTEM_SPINNER`,children:[t,` `]}),(0,D.jsxs)(a,{dimColor:!0,children:[`v`,`0.0.31`,` `]})]}),(0,D.jsx)(a,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,D.jsx)(a,{children:` * █████▓▓░ `}),(0,D.jsx)(a,{children:` * ███▓░ ░░ `}),(0,D.jsx)(a,{children:` ░░░░░░ ███▓░ `}),(0,D.jsx)(a,{children:` ░░░ ░░░░░░░░░░ ███▓░ `}),(0,D.jsxs)(a,{children:[(0,D.jsx)(a,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,D.jsx)(a,{bold:!0,children:`*`}),(0,D.jsx)(a,{children:` ██▓░░ ▓ `})]}),(0,D.jsx)(a,{children:` ░▓▓███▓▓░ `}),(0,D.jsx)(a,{dimColor:!0,children:` * ░░░░ `}),(0,D.jsx)(a,{dimColor:!0,children:` ░░░░░░░░ `}),(0,D.jsx)(a,{dimColor:!0,children:` ░░░░░░░░░░░░░░░░ `})]})}S(),w(),c();var j=(0,E.createContext)({marker:``});function M({children:e}){let{marker:t}=(0,E.useContext)(j);return(0,D.jsxs)(r,{gap:1,children:[(0,D.jsx)(a,{dimColor:!0,children:t}),(0,D.jsx)(r,{flexDirection:`column`,children:e})]})}c();var N=(0,E.createContext)({marker:``});function P({children:e}){let{marker:t}=(0,E.useContext)(N),n=0;for(let t of E.Children.toArray(e))!(0,E.isValidElement)(t)||t.type!==M||n++;let i=String(n).length;return(0,D.jsx)(r,{flexDirection:`column`,children:E.Children.map(e,(e,n)=>{if(!(0,E.isValidElement)(e)||e.type!==M)return e;let r=`${String(n+1).padStart(i)}.`,a=`${t}${r}`;return(0,D.jsx)(N.Provider,{value:{marker:a},children:(0,D.jsx)(j.Provider,{value:{marker:a},children:e})})})})}P.Item=M;var F=P;c(),u();function I({onDone:e}){let[o,c]=(0,E.useState)(0),[l,u]=n();(0,E.useEffect)(()=>{},[]);function f(){if(o<x.length-1){let e=o+1;c(e),x[e]?.id}else e()}function p(e){u(e),f()}let h=m(),g=(0,D.jsx)(r,{marginX:1,children:(0,D.jsx)(C,{onThemeSelect:p,showIntroText:!0,helpText:`To change this later, run /theme`,hideEscToCancel:!0,skipExitHandling:!0})}),y=(0,D.jsxs)(r,{flexDirection:`column`,gap:1,paddingLeft:1,children:[(0,D.jsx)(a,{bold:!0,children:`Before you start, keep in mind:`}),(0,D.jsx)(r,{flexDirection:`column`,width:70,children:(0,D.jsxs)(F,{children:[(0,D.jsxs)(F.Item,{children:[(0,D.jsx)(a,{children:`Always review changes before accepting`}),(0,D.jsxs)(a,{dimColor:!0,wrap:`wrap`,children:[`Work Mate can make mistakes — especially when running commands`,(0,D.jsx)(s,{}),`or editing files. You stay in control of every action.`,(0,D.jsx)(s,{})]})]}),(0,D.jsxs)(F.Item,{children:[(0,D.jsx)(a,{children:`Only use Work Mate on projects you trust`}),(0,D.jsxs)(a,{dimColor:!0,wrap:`wrap`,children:[`Untrusted code could contain prompt injection attacks.`,(0,D.jsx)(s,{}),(0,D.jsx)(i,{url:`https://code.workmate.com/docs/en/security`})]})]})]})}),(0,D.jsx)(T,{})]}),x=[];x.push({id:`theme`,component:g}),x.push({id:`security`,component:y}),v()&&x.push({id:`terminal-setup`,component:(0,D.jsxs)(r,{flexDirection:`column`,gap:1,paddingLeft:1,children:[(0,D.jsx)(a,{bold:!0,children:`Use Work Mate's terminal setup?`}),(0,D.jsxs)(r,{flexDirection:`column`,width:70,gap:1,children:[(0,D.jsxs)(a,{children:[`For the optimal coding experience, enable the recommended settings`,(0,D.jsx)(s,{}),`for your terminal:`,` `,d.terminal===`Apple_Terminal`?`Option+Enter for newlines and visual bell`:`Shift+Enter for newlines`]}),(0,D.jsx)(_,{options:[{label:`Yes, use recommended settings`,value:`install`},{label:`No, maybe later with /terminal-setup`,value:`no`}],onChange:e=>{e===`install`?b(l).catch(()=>{}).finally(f):f()},onCancel:()=>f()}),(0,D.jsx)(a,{dimColor:!0,children:h.pending?(0,D.jsxs)(D.Fragment,{children:[`Press `,h.keyName,` again to exit`]}):(0,D.jsx)(D.Fragment,{children:`Enter to confirm · Esc to skip`})})]})]})});let S=x[o],w=(0,E.useCallback)(()=>{o===x.length-1?e():f()},[o,x.length,e]),O=(0,E.useCallback)(()=>{f()},[o,x.length,e]);return t({"confirm:yes":w},{context:`Confirmation`,isActive:S?.id===`security`}),t({"confirm:no":O},{context:`Confirmation`,isActive:S?.id===`terminal-setup`}),(0,D.jsxs)(r,{flexDirection:`column`,children:[(0,D.jsx)(k,{}),(0,D.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[S?.component,h.pending&&(0,D.jsx)(r,{padding:1,children:(0,D.jsxs)(a,{dimColor:!0,children:[`Press `,h.keyName,` again to exit`]})})]})]})}export{I as Onboarding};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Gr as n,I as r,P as i,ai as a,ot as o,t as s}from"./src-BX54x08P.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{lb as l}from"./loadAgentsDir-
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Gr as n,I as r,P as i,ai as a,ot as o,t as s}from"./src-BX54x08P.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{lb as l}from"./loadAgentsDir-CgDTTnMX.js";import{S as u,_ as d,b as f}from"./startupProfiler-C_xcIvEA.js";function p(e){return e.startsWith(`file-`)?`+`:e.startsWith(`mcp-resource-`)?`◇`:e.startsWith(`agent-`)?`*`:`+`}function m(e){return e.startsWith(`file-`)||e.startsWith(`mcp-resource-`)||e.startsWith(`agent-`)}function h({suggestions:e,selectedSuggestion:t,maxColumnWidth:i,overlay:a}){let{rows:s}=o(),c=a?5:Math.min(6,Math.max(1,s-3));if(e.length===0)return null;let l=i??Math.max(...e.map(e=>n(e.displayText)))+5,u=Math.max(0,Math.min(t-Math.floor(c/2),e.length-c)),d=Math.min(u+c,e.length),f=e.slice(u,d);return(0,_.jsx)(r,{flexDirection:`column`,justifyContent:a?void 0:`flex-end`,children:f.map(n=>(0,_.jsx)(v,{item:n,maxColumnWidth:l,isSelected:n.id===e[t]?.id},n.id))})}var g,_,v,y,b=e((()=>{g=t(a(),1),l(),s(),d(),_=c(),v=(0,g.memo)(function({item:e,maxColumnWidth:t,isSelected:r}){let a=o().columns;if(m(e.id)){let t=p(e.id),o=r?`suggestion`:void 0,s=!r,c=e.id.startsWith(`file-`),l=e.id.startsWith(`mcp-resource-`),d=e.description?3:0,m;if(c){let t=e.description?Math.min(20,n(e.description)):0,r=a-2-4-d-t;m=f(e.displayText,r)}else m=l?u(e.displayText,30):e.displayText;let h=a-2-n(m)-d-4,g;if(e.description){let n=Math.max(0,h),r=u(e.description.replace(/\s+/g,` `),n);g=`${t} ${m} – ${r}`}else g=`${t} ${m}`;return(0,_.jsx)(i,{color:o,dimColor:s,wrap:`truncate`,children:g})}let s=Math.floor(a*.4),c=Math.min(t??n(e.displayText)+5,s),l=e.color||(r?`suggestion`:void 0),d=!r,h=e.displayText;n(h)>c-2&&(h=u(h,c-2));let g=h+` `.repeat(Math.max(0,c-n(h))),v=e.tag?`[${e.tag}] `:``,y=n(v),b=Math.max(0,a-c-y-4),x=e.description?u(e.description.replace(/\s+/g,` `),b):``;return(0,_.jsxs)(i,{wrap:`truncate`,children:[(0,_.jsx)(i,{color:l,dimColor:d,children:g}),v?(0,_.jsx)(i,{color:e.tag===`local`?`ansi:yellow`:void 0,dimColor:e.tag!==`local`,children:v}):null,(0,_.jsx)(i,{color:r?`suggestion`:void 0,dimColor:!r,children:x})]})}),y=(0,g.memo)(h)}));export{y as n,b as r,h as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,P as n,t as r}from"./src-BX54x08P.js";import{t as i}from"./jsx-runtime-Bb4Xn-E0.js";import{Xt as a,qt as o}from"./settings-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,P as n,t as r}from"./src-BX54x08P.js";import{t as i}from"./jsx-runtime-Bb4Xn-E0.js";import{Xt as a,qt as o}from"./settings-CA-5Px85.js";import{FC as s,MC as c,NC as l,ab as u,ib as d}from"./loadAgentsDir-CgDTTnMX.js";import{d as f,o as p}from"./config-CMtnYZR9.js";import{i as m,o as h}from"./bundledMode-Dqe4pz0a.js";import{a as g,s as _}from"./sleep-BGewNhNx.js";import{a as v,i as y,r as b}from"./terminalSetup-h_TPZN2E.js";function x(){return p().editorMode===`vim`}function S(){return o.terminal===`Apple_Terminal`&&process.platform===`darwin`||v()?`shift + ⏎ for newline`:b()?`\\⏎ for newline`:`backslash (\\) + return (⏎) for newline`}function C(e,t){return t.ctrl||t.meta||t.escape||t.return||t.tab||t.backspace||t.delete||t.upArrow||t.downArrow||t.leftArrow||t.rightArrow||t.pageUp||t.pageDown||t.home||t.end?!1:e.length>0&&!/^\s/.test(e)&&!e.startsWith(`\x1B`)}var w=e((()=>{y(),f(),a()}));function T(e){return e.replace(/\+/g,` + `)}function E(e){let{dimColor:r,fixedWidth:i,gap:a,paddingX:o}=e,c=T(u(`app:toggleTranscript`,`Global`,`ctrl+o`)),d=T(u(`app:toggleTodos`,`Global`,`ctrl+t`)),f=T(u(`chat:undo`,`Chat`,`ctrl+_`)),p=T(u(`chat:stash`,`Chat`,`ctrl+s`)),h=T(u(`chat:cycleMode`,`Chat`,`shift+tab`)),g=T(u(`chat:modelPicker`,`Chat`,`alt+p`)),v=T(u(`chat:fastMode`,`Chat`,`alt+o`)),y=T(u(`chat:externalEditor`,`Chat`,`ctrl+g`));T(u(`app:toggleTerminal`,`Global`,`meta+j`));let b=T(u(`chat:imagePaste`,`Chat`,`ctrl+v`));return(0,D.jsxs)(t,{paddingX:o,flexDirection:`row`,gap:a,children:[(0,D.jsxs)(t,{flexDirection:`column`,width:i?24:void 0,children:[(0,D.jsx)(t,{children:(0,D.jsx)(n,{dimColor:r,children:`! for bash mode`})}),(0,D.jsx)(t,{children:(0,D.jsx)(n,{dimColor:r,children:`/ for commands`})}),(0,D.jsx)(t,{children:(0,D.jsx)(n,{dimColor:r,children:`@ for file paths`})}),(0,D.jsx)(t,{children:(0,D.jsx)(n,{dimColor:r,children:`& for background`})}),(0,D.jsx)(t,{children:(0,D.jsx)(n,{dimColor:r,children:`/btw for side question`})})]}),(0,D.jsxs)(t,{flexDirection:`column`,width:i?35:void 0,children:[(0,D.jsx)(t,{children:(0,D.jsx)(n,{dimColor:r,children:`double tap esc to clear input`})}),(0,D.jsx)(t,{children:(0,D.jsxs)(n,{dimColor:r,children:[h,` to auto-accept edits`]})}),(0,D.jsx)(t,{children:(0,D.jsxs)(n,{dimColor:r,children:[c,` for verbose output`]})}),(0,D.jsx)(t,{children:(0,D.jsxs)(n,{dimColor:r,children:[d,` to toggle tasks`]})}),(0,D.jsx)(t,{children:(0,D.jsx)(n,{dimColor:r,children:S()})})]}),(0,D.jsxs)(t,{flexDirection:`column`,children:[(0,D.jsx)(t,{children:(0,D.jsxs)(n,{dimColor:r,children:[f,` to undo`]})}),m()!==`windows`&&(0,D.jsx)(t,{children:(0,D.jsx)(n,{dimColor:r,children:`ctrl + z to suspend`})}),(0,D.jsx)(t,{children:(0,D.jsxs)(n,{dimColor:r,children:[b,` to paste images`]})}),(0,D.jsx)(t,{children:(0,D.jsxs)(n,{dimColor:r,children:[g,` to switch model`]})}),s()&&l()&&(0,D.jsx)(t,{children:(0,D.jsxs)(n,{dimColor:r,children:[v,` to toggle fast mode`]})}),(0,D.jsx)(t,{children:(0,D.jsxs)(n,{dimColor:r,children:[p,` to stash prompt`]})}),(0,D.jsx)(t,{children:(0,D.jsxs)(n,{dimColor:r,children:[y,` to edit in $EDITOR`]})}),_()&&(0,D.jsx)(t,{children:(0,D.jsx)(n,{dimColor:r,children:`/keybindings to customize`})})]})]})}var D,O=e((()=>{r(),h(),g(),d(),c(),w(),D=i()}));export{x as a,C as i,O as n,w as r,E as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,P as n,ai as r,kt as i,t as a}from"./src-BX54x08P.js";import{t as o}from"./jsx-runtime-Bb4Xn-E0.js";import{i as s,n as c}from"./loader-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,P as n,ai as r,kt as i,t as a}from"./src-BX54x08P.js";import{t as o}from"./jsx-runtime-Bb4Xn-E0.js";import{i as s,n as c}from"./loader-DsEdsMHv.js";import{r as l,t as u}from"./switcher-CqGz0hjQ.js";import{n as d,t as f}from"./useExitOnCtrlCDWithKeybindings-z3RiW9jT.js";import{t as p}from"./select-BNeFiLNP.js";import{t as m}from"./CustomSelect-uOjgHk8D.js";var h=e(r(),1);a(),f(),c(),l(),m();var g=o(),_=[{key:`id`,label:`Provider id (kebab-case)`,placeholder:`my-provider`},{key:`baseUrl`,label:`Base URL`,placeholder:`https://api.example.com/v1`},{key:`apiKey`,label:`API Key`,placeholder:`sk-...`},{key:`model`,label:`Default model`,placeholder:`gpt-4o-mini`}],v=[{value:`save-openai`,label:`Save as OpenAI-compat (Chat Completions API)`},{value:`save-anthropic`,label:`Save as Anthropic-compat (Messages API)`},{value:`skip`,label:`Skip — configure later with /provider add`}];function y(e){return e===`save-openai`||e===`save-anthropic`||e===`skip`}function b(e){if(!e.id)return`Provider id is required.`;if(!/^[a-z0-9-]+$/.test(e.id))return`Provider id must be kebab-case (lowercase letters, digits, hyphens).`;if(!e.baseUrl)return`Base URL is required.`;try{new URL(e.baseUrl)}catch{return`Base URL must be a valid URL.`}return e.apiKey?null:`API Key is required.`}function x({onDone:e}){let r=(0,h.useRef)({id:``,baseUrl:``,apiKey:``,model:``}),[a,o]=(0,h.useState)(null),c=d();async function l(t){if(t===`skip`){e();return}let n=t===`save-openai`?`openai-compat`:`anthropic-compat`,i=b(r.current);if(i){o(i);return}let a={id:r.current.id,kind:n,baseUrl:r.current.baseUrl,apiKey:r.current.apiKey,defaultModel:r.current.model||`gpt-4o-mini`};try{s([a]),await u(a.id)}catch(e){let t=e instanceof Error?e.message:String(e);o(`Failed to save provider: ${t}`);return}e()}function f(e){o(null),y(e)&&l(e)}let m=[..._.map(e=>({type:`input`,label:e.label,value:e.key,placeholder:e.placeholder,allowEmptySubmitToCancel:!0,onChange:t=>{r.current[e.key]=t}})),...v.map(e=>({type:`text`,label:e.label,value:e.value}))];return(0,g.jsxs)(t,{flexDirection:`column`,gap:1,paddingLeft:1,children:[(0,g.jsx)(n,{bold:!0,color:`permission`,children:`Configure an API provider`}),(0,g.jsx)(t,{flexDirection:`column`,width:70,children:(0,g.jsxs)(n,{dimColor:!0,wrap:`wrap`,children:[`No provider is configured yet — `,(0,g.jsx)(n,{children:`~/.workmate/providers.json`}),` was not found.`,(0,g.jsx)(i,{}),`Fill in the fields below to point Work Mate at any OpenAI- or Anthropic-compatible`,(0,g.jsx)(i,{}),`endpoint. Type to edit a focused field, ↑/↓ to move between rows, Enter to trigger`,(0,g.jsx)(i,{}),`the highlighted action.`]})}),(0,g.jsx)(p,{options:m,onChange:f,onCancel:()=>e(),visibleOptionCount:m.length}),a&&(0,g.jsx)(n,{color:`error`,wrap:`wrap`,children:a}),c.pending&&(0,g.jsxs)(n,{dimColor:!0,children:[`Press `,c.keyName,` again to exit`]})]})}export{x as ProviderSetup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,o as n,s as r}from"./envUtils-QyzA_cFM.js";import{n as i,t as a}from"./defineProperty-C-QyHrDq.js";import{Kr as o,qr as s}from"./src-BX54x08P.js";import{X as c,d as l,m as u,q as d}from"./settings-D4M13toi.js";import{Ft as ee,K as f,Pt as p,at as m,ft as h,gt as g,rt as _}from"./state-CXY-q5gr.js";import{Aa as te,Cb as ne,Ds as v,Es as re,Gv as y,Hv as b,I_ as x,Ia as S,Kr as C,L_ as w,MC as T,Mi as ie,Pi as E,Q as D,Qn as O,R_ as ae,Ra as oe,SS as k,Sb as se,Ts as ce,Up as A,Vp as j,Vv as M,Xi as le,Xs as ue,Xu as de,YS as fe,Ys as N,Z as pe,_n as P,_v as F,_w as I,bC as me,ct as he,gv as ge,hS as _e,ig as ve,kC as L,lt as ye,ma as be,py as xe,qS as Se,qu as R,qv as z,qx as Ce,ry as B,sg as V,tg as we,tt as Te,uw as H,vn as Ee,vr as De,vw as Oe,ws as ke,yC as Ae}from"./loadAgentsDir-BfLCckVj.js";import{n as U,t as je}from"./cwd-DrEEb4f5.js";import{C as Me,S as Ne,d as W,o as Pe}from"./config-Bio2EjUK.js";import{i as Fe,o as Ie,q as Le}from"./log-L1kqxa_P.js";import{f as G,s as Re,v as ze}from"./model-BIf2i1is.js";import{at as K,bn as Be,nt as Ve,vn as He}from"./prompt-DaYH88Oe.js";import{n as Ue,o as We,r as q}from"./MessageSelector-CFz30wBL.js";import{n as Ge,t as J}from"./systemTheme-Ceakddth.js";import{randomUUID as Y}from"crypto";n(),i(),o(),p(),U(),Ie(),u(),Me(),He(),W(),I(),T(),Ae(),k(),xe(),K(),z(),F(),V(),A(),N(),S(),le(),E(),De(),P(),D(),ye(),ae(),b(),G(),B(),R();async function Ke({tools:e,mainLoopModel:t,additionalWorkingDirectories:n,mcpClients:r,customSystemPrompt:i}){let[a,o,s]=await Promise.all([i===void 0?he(e,t,n,r):Promise.resolve([]),w(),i===void 0?x():Promise.resolve({})]);return{defaultSystemPrompt:a,userContext:o,systemContext:s}}async function qe({tools:e,commands:t,mcpClients:n,messages:r,readFileState:i,getAppState:a,setAppState:o,customSystemPrompt:s,appendSystemPrompt:c,thinkingConfig:l,agents:u}){let d=Re(),ee=a(),{defaultSystemPrompt:f,userContext:p,systemContext:m}=await Ke({tools:e,mainLoopModel:d,additionalWorkingDirectories:Array.from(ee.toolPermissionContext.additionalWorkingDirectories.keys()),mcpClients:n,customSystemPrompt:s}),h=Se([...s===void 0?f:[s],...c?[c]:[]]),g=r.at(-1),_=g?.type===`assistant`&&g.message.stop_reason===null?r.slice(0,-1):r;return{systemPrompt:h,userContext:p,systemContext:m,toolUseContext:{options:{commands:t,debug:!1,mainLoopModel:d,tools:e,verbose:!1,thinkingConfig:l??(de()===!1?{type:`disabled`}:{type:`adaptive`}),mcpClients:n,mcpResources:{},isNonInteractiveSession:!0,agentDefinitions:{activeAgents:u,allAgents:[]},customSystemPrompt:s,appendSystemPrompt:c},abortController:M(),readFileState:i,getAppState:a,setAppState:o,messages:_,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:()=>{},updateAttributionState:()=>{}},forkContextMessages:_}}c(),se(),te(),J(),H();function X(e){return e.flatMap(e=>{if(!e)return[];switch(e.type){case`assistant`:return[{type:`assistant`,message:e.message,uuid:e.uuid,requestId:void 0,timestamp:new Date().toISOString()}];case`user`:return[{type:`user`,message:e.message,uuid:e.uuid??Y(),timestamp:e.timestamp??new Date().toISOString(),isMeta:e.isSynthetic}];default:return[]}})}function Je(e){let t=e.preservedSegment;return{trigger:e.trigger,pre_tokens:e.preTokens,...t&&{preserved_segment:{head_uuid:t.headUuid,anchor_uuid:t.anchorUuid,tail_uuid:t.tailUuid}}}}function Ye(e,t){let n=Ce({content:s(e).replace(/<local-command-stdout>([\s\S]*?)<\/local-command-stdout>/,`$1`).replace(/<local-command-stderr>([\s\S]*?)<\/local-command-stderr>/,`$1`).trim()});return{type:`assistant`,content:n.message?.content,message:n.message,parent_tool_use_id:null,session_id:m(),uuid:t}}function Z(e){if(e)return{type:`rate_limit`,status:e.status,...e.resetsAt!==void 0&&{resetsAt:e.resetsAt},...e.rateLimitType!==void 0&&{rateLimitType:e.rateLimitType},...e.utilization!==void 0&&{utilization:e.utilization},...e.overageStatus!==void 0&&{overageStatus:e.overageStatus},...e.overageResetsAt!==void 0&&{overageResetsAt:e.overageResetsAt},...e.overageDisabledReason!==void 0&&{overageDisabledReason:e.overageDisabledReason},...e.isUsingOverage!==void 0&&{isUsingOverage:e.isUsingOverage},...e.surpassedThreshold!==void 0&&{surpassedThreshold:e.surpassedThreshold}}}p();function Xe(e){return e===`Agent`?d:e}function Ze(e){let t=l()?.outputStyle??`default`,n={type:`system`,subtype:`init`,cwd:je(),session_id:m(),tools:e.tools.map(e=>Xe(e.name)),mcp_servers:e.mcpClients.map(e=>({name:e.name,status:e.type})),model:e.model,permissionMode:e.permissionMode,slash_commands:e.commands.filter(e=>e.userInvocable!==!1).map(e=>e.name),apiKeySource:process.env.ANTHROPIC_API_KEY?`ANTHROPIC_API_KEY`:`none`,betas:_(),claude_code_version:`0.0.29`,output_style:t,agents:e.agents.map(e=>e.agentType),skills:e.skills.filter(e=>e.userInvocable!==!1).map(e=>e.name),plugins:e.plugins.map(e=>({name:e.name,path:e.path,source:e.source})),uuid:Y()};return n.fast_mode_state=L(e.model,e.fastMode),n}p(),o(),Le(),b(),U(),T(),le(),G(),B(),R(),ce();var Qe=()=>{try{return q(),e(Ue)}catch{return null}},Q=class{constructor(e){a(this,`config`,void 0),a(this,`mutableMessages`,void 0),a(this,`abortController`,void 0),a(this,`permissionDenials`,void 0),a(this,`totalUsage`,void 0),a(this,`hasHandledOrphanedPermission`,!1),a(this,`readFileState`,void 0),a(this,`discoveredSkillNames`,new Set),a(this,`loadedNestedMemoryPaths`,new Set),this.config=e,this.mutableMessages=e.initialMessages??[],this.abortController=e.abortController??M(),this.permissionDenials=[],this.readFileState=e.readFileCache,this.totalUsage=fe}async*submitMessage(e,n){let{cwd:i,commands:a,tools:o,mcpClients:c,verbose:l=!1,thinkingConfig:u,maxTurns:d,maxBudgetUsd:p,taskBudget:_,canUseTool:te,customSystemPrompt:y,appendSystemPrompt:b,userSpecifiedModel:x,fallbackModel:S,jsonSchema:w,getAppState:T,setAppState:E,replayUserMessages:D=!1,includePartialMessages:ae=!1,agents:k=[],setSDKStatus:se,orphanedPermission:ce}=this.config;this.discoveredSkillNames.clear(),this.permissionDenials=[],ne(i);let A=!ee(),M=Date.now(),le=async(e,t,n,r,i,a)=>{let o=await te(e,t,n,r,i,a);return o.behavior!==`allow`&&this.permissionDenials.push({type:`permission_denial`,tool_name:Xe(e.name),tool_use_id:i,tool_input:t}),o},N=T(),P=x?ze(x):Re(),F=u||(de()===!1?{type:`disabled`}:{type:`adaptive`});j(`before_getSystemPrompt`);let I=typeof y==`string`?y:void 0,{defaultSystemPrompt:he,userContext:ye,systemContext:xe}=await Ke({tools:o,mainLoopModel:P,additionalWorkingDirectories:Array.from(N.toolPermissionContext.additionalWorkingDirectories.keys()),mcpClients:c,customSystemPrompt:I});j(`after_getSystemPrompt`);let R={...ye},z=I!==void 0&&Ne()?await Oe():null,Ce=Se([...I===void 0?he:[I],...z?[z]:[],...b?[b]:[]]),B=o.some(e=>Be(e,Ve));w&&B&&Ee(E,m());let V={messages:this.mutableMessages,setMessages:e=>{this.mutableMessages=e(this.mutableMessages)},onChangeAPIKey:()=>{},handleElicitation:this.config.handleElicitation,options:{commands:a,debug:!1,tools:o,verbose:l,mainLoopModel:P,thinkingConfig:F,mcpClients:c,mcpResources:{},isNonInteractiveSession:!0,customSystemPrompt:y,appendSystemPrompt:b,agentDefinitions:{activeAgents:k,allAgents:[]},theme:Ge(Pe().theme),maxBudgetUsd:p},getAppState:T,setAppState:E,abortController:this.abortController,readFileState:this.readFileState,nestedMemoryAttachmentTriggers:new Set,loadedNestedMemoryPaths:this.loadedNestedMemoryPaths,dynamicSkillDirTriggers:new Set,discoveredSkillNames:this.discoveredSkillNames,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:e=>{E(t=>{let n=e(t.fileHistory);return n===t.fileHistory?t:{...t,fileHistory:n}})},updateAttributionState:e=>{E(t=>{let n=e(t.attribution);return n===t.attribution?t:{...t,attribution:n}})},setSDKStatus:se};if(ce&&!this.hasHandledOrphanedPermission){this.hasHandledOrphanedPermission=!0;for await(let e of ke(ce,o,this.mutableMessages,V))yield e}let{messages:H,shouldQuery:De,allowedTools:Ae,model:U,resultText:Me}=await We({input:e,mode:`prompt`,setToolJSX:()=>{},context:{...V,messages:this.mutableMessages},messages:this.mutableMessages,uuid:n?.uuid,isMeta:n?.isMeta,querySource:`sdk`});this.mutableMessages.push(...H);let W=[...this.mutableMessages];if(A&&H.length>0){let e=C(W);r()||(await e,(t(process.env.WORKMATE_EAGER_FLUSH)||t(process.env.WORKMATE_IS_COWORK))&&await O())}let Ie=Qe(),Le=H.filter(e=>e.type===`user`&&!e.isMeta&&!e.toolUseResult&&(Ie?.selectableUserMessagesFilter(e)??!0)||e.type===`system`&&e.subtype===`compact_boundary`),G=D?Le:[];E(e=>({...e,toolPermissionContext:{...e.toolPermissionContext,alwaysAllowRules:{...e.toolPermissionContext.alwaysAllowRules,command:Ae}}}));let K=U??P;V={messages:W,setMessages:()=>{},onChangeAPIKey:()=>{},handleElicitation:this.config.handleElicitation,options:{commands:a,debug:!1,tools:o,verbose:l,mainLoopModel:K,thinkingConfig:F,mcpClients:c,mcpResources:{},isNonInteractiveSession:!0,customSystemPrompt:y,appendSystemPrompt:b,theme:Ge(Pe().theme),agentDefinitions:{activeAgents:k,allAgents:[]},maxBudgetUsd:p},getAppState:T,setAppState:E,abortController:this.abortController,readFileState:this.readFileState,nestedMemoryAttachmentTriggers:new Set,loadedNestedMemoryPaths:this.loadedNestedMemoryPaths,dynamicSkillDirTriggers:new Set,discoveredSkillNames:this.discoveredSkillNames,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:V.updateFileHistoryState,updateAttributionState:V.updateAttributionState,setSDKStatus:se},j(`before_skills_plugins`);let[He,{enabled:Ue}]=await Promise.all([ie(je()),oe()]);if(j(`after_skills_plugins`),yield Ze({tools:o,mcpClients:c,model:K,permissionMode:N.toolPermissionContext.mode,commands:a,agents:k,skills:He,plugins:Ue,fastMode:N.fastMode}),j(`system_message_yielded`),!De){for(let e of H)if(e.type===`user`&&typeof e.message.content==`string`&&(e.message.content.includes(`<local-command-stdout>`)||e.message.content.includes(`<local-command-stderr>`)||e.isCompactSummary)&&(yield{type:`user`,message:{...e.message,content:s(e.message.content)},session_id:m(),parent_tool_use_id:null,uuid:e.uuid,timestamp:e.timestamp,isReplay:!e.isCompactSummary,isSynthetic:e.isMeta||e.isVisibleInTranscriptOnly}),e.type===`system`&&e.subtype===`local_command`&&typeof e.content==`string`&&(e.content.includes(`<local-command-stdout>`)||e.content.includes(`<local-command-stderr>`))&&(yield Ye(e.content,e.uuid)),e.type===`system`&&e.subtype===`compact_boundary`){let t=e;yield{type:`system`,subtype:`compact_boundary`,session_id:m(),uuid:e.uuid,compact_metadata:Je(t.compactMetadata)}}A&&(await C(W),(t(process.env.WORKMATE_EAGER_FLUSH)||t(process.env.WORKMATE_IS_COWORK))&&await O()),yield{type:`result`,subtype:`success`,is_error:!1,duration_ms:Date.now()-M,duration_api_ms:h(),num_turns:W.length-1,result:Me??``,stop_reason:null,session_id:m(),total_cost_usd:g(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:L(K,N.fastMode),uuid:Y()};return}if(we()&&A){let e=Qe()?.selectableUserMessagesFilter??(e=>!0);H.filter(e).forEach(e=>{ve(e=>{E(t=>({...t,fileHistory:e(t.fileHistory)}))},e.uuid)})}let q=fe,J=1,qe=!1,X,Z=null,Q=Fe().at(-1),$e=w?be(this.mutableMessages,Ve):0;for await(let e of ue({messages:W,systemPrompt:Ce,userContext:R,systemContext:xe,canUseTool:le,toolUseContext:V,fallbackModel:S,querySource:`sdk`,maxTurns:d,taskBudget:_})){if(e.type===`assistant`||e.type===`user`||e.type===`system`&&e.subtype===`compact_boundary`){if(A&&e.type===`system`&&e.subtype===`compact_boundary`){let t=e.compactMetadata?.preservedSegment?.tailUuid;if(t){let e=this.mutableMessages.findLastIndex(e=>e.uuid===t);e!==-1&&await C(this.mutableMessages.slice(0,e+1))}}if(W.push(e),A&&(e.type===`assistant`?C(W):await C(W)),!qe&&G.length>0){qe=!0;for(let e of G)e.type===`user`&&(yield{type:`user`,message:e.message,session_id:m(),parent_tool_use_id:null,uuid:e.uuid,timestamp:e.timestamp,isReplay:!0})}}switch(e.type===`user`&&J++,e.type){case`tombstone`:break;case`assistant`:{let t=e,n=t.message?.stop_reason;n!=null&&(Z=n),this.mutableMessages.push(t),yield*v(t);break}case`progress`:{let t=e;this.mutableMessages.push(t),A&&(W.push(t),C(W)),yield*v(t);break}case`user`:{let t=e;this.mutableMessages.push(t),yield*v(t);break}case`stream_event`:{let t=e.event;if(t.type===`message_start`){q=fe;let e=t.message;q=Te(q,e.usage)}if(t.type===`message_delta`){q=Te(q,t.usage);let e=t.delta;e.stop_reason!=null&&(Z=e.stop_reason)}t.type===`message_stop`&&(this.totalUsage=pe(this.totalUsage,q)),ae&&(yield{type:`stream_event`,event:t,session_id:m(),parent_tool_use_id:null,uuid:Y()});break}case`attachment`:{let n=e;this.mutableMessages.push(n),A&&(W.push(n),C(W));let r=n.attachment;if(r.type===`structured_output`)X=r.data;else if(r.type===`max_turns_reached`){A&&(t(process.env.WORKMATE_EAGER_FLUSH)||t(process.env.WORKMATE_IS_COWORK))&&await O(),yield{type:`result`,subtype:`error_max_turns`,duration_ms:Date.now()-M,duration_api_ms:h(),is_error:!0,num_turns:r.turnCount,stop_reason:Z,session_id:m(),total_cost_usd:g(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:L(K,N.fastMode),uuid:Y(),errors:[`Reached maximum number of turns (${r.maxTurns})`]};return}else D&&r.type===`queued_command`&&(yield{type:`user`,message:{role:`user`,content:r.prompt},session_id:m(),parent_tool_use_id:null,uuid:r.source_uuid||n.uuid,timestamp:n.timestamp,isReplay:!0});break}case`stream_request_start`:break;case`system`:{let t=e,n=this.config.snipReplay?.(t,this.mutableMessages);if(n!==void 0){n.executed&&(this.mutableMessages.length=0,this.mutableMessages.push(...n.messages));break}if(this.mutableMessages.push(t),t.subtype===`compact_boundary`&&t.compactMetadata){let e=t,n=this.mutableMessages.length-1;n>0&&this.mutableMessages.splice(0,n);let r=W.length-1;r>0&&W.splice(0,r),yield{type:`system`,subtype:`compact_boundary`,session_id:m(),uuid:t.uuid,compact_metadata:Je(e.compactMetadata)}}if(t.subtype===`api_error`){let e=t;yield{type:`system`,subtype:`api_retry`,attempt:e.retryAttempt,max_retries:e.maxRetries,retry_delay_ms:e.retryInMs,error_status:e.error.status??null,error:ge(e.error),session_id:m(),uuid:t.uuid}}break}case`tool_use_summary`:{let t=e;yield{type:`tool_use_summary`,summary:t.summary,preceding_tool_use_ids:t.precedingToolUseIds,session_id:m(),uuid:t.uuid};break}}if(p!==void 0&&g()>=p){A&&(t(process.env.WORKMATE_EAGER_FLUSH)||t(process.env.WORKMATE_IS_COWORK))&&await O(),yield{type:`result`,subtype:`error_max_budget_usd`,duration_ms:Date.now()-M,duration_api_ms:h(),is_error:!0,num_turns:J,stop_reason:Z,session_id:m(),total_cost_usd:g(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:L(K,N.fastMode),uuid:Y(),errors:[`Reached maximum budget ($${p}). Increase the limit with --max-budget-usd or start a new session.`]};return}if(e.type===`user`&&w){let e=be(this.mutableMessages,Ve)-$e,n=parseInt(process.env.MAX_STRUCTURED_OUTPUT_RETRIES||`5`,10);if(e>=n){A&&(t(process.env.WORKMATE_EAGER_FLUSH)||t(process.env.WORKMATE_IS_COWORK))&&await O(),yield{type:`result`,subtype:`error_max_structured_output_retries`,duration_ms:Date.now()-M,duration_api_ms:h(),is_error:!0,num_turns:J,stop_reason:Z,session_id:m(),total_cost_usd:g(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:L(K,N.fastMode),uuid:Y(),errors:[`Failed to provide valid structured output after ${n} attempts`]};return}}}let $=W.findLast(e=>e.type===`assistant`||e.type===`user`),et=$?.type??`undefined`,tt=$?.type===`assistant`?me($.message.content)?.type??`none`:`n/a`;if(A&&(t(process.env.WORKMATE_EAGER_FLUSH)||t(process.env.WORKMATE_IS_COWORK))&&await O(),!re($,Z)){yield{type:`result`,subtype:`error_during_execution`,duration_ms:Date.now()-M,duration_api_ms:h(),is_error:!0,num_turns:J,stop_reason:Z,session_id:m(),total_cost_usd:g(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:L(K,N.fastMode),uuid:Y(),errors:(()=>{let e=Fe(),t=Q?e.lastIndexOf(Q)+1:0;return[`[ede_diagnostic] result_type=${et} last_content_type=${tt} stop_reason=${Z}`,...e.slice(t).map(e=>e.error)]})()};return}let nt=``,rt=!1;if($.type===`assistant`){let e=me($.message.content);e?.type===`text`&&!_e.has(e.text)&&(nt=e.text),rt=!!$.isApiErrorMessage}yield{type:`result`,subtype:`success`,is_error:rt,duration_ms:Date.now()-M,duration_api_ms:h(),num_turns:J,result:nt,stop_reason:Z,session_id:m(),total_cost_usd:g(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,structured_output:X,fast_mode_state:L(K,N.fastMode),uuid:Y()}}interrupt(){this.abortController.abort()}resetAbortController(){this.abortController=M()}getAbortSignal(){return this.abortController.signal}getMessages(){return this.mutableMessages}getReadFileState(){return this.readFileState}getSessionId(){return m()}setModel(e){this.config.userSpecifiedModel=e}};async function*$e({commands:e,prompt:t,promptUuid:n,isMeta:r,cwd:i,tools:a,mcpClients:o,verbose:s=!1,thinkingConfig:c,maxTurns:l,maxBudgetUsd:u,taskBudget:d,canUseTool:ee,mutableMessages:f=[],getReadFileCache:p,setReadFileCache:m,customSystemPrompt:h,appendSystemPrompt:g,userSpecifiedModel:_,fallbackModel:te,jsonSchema:ne,getAppState:v,setAppState:re,abortController:b,replayUserMessages:x=!1,includePartialMessages:S=!1,handleElicitation:C,agents:w=[],setSDKStatus:T,orphanedPermission:ie}){let E=new Q({cwd:i,tools:a,commands:e,mcpClients:o,agents:w??[],canUseTool:ee,getAppState:v,setAppState:re,initialMessages:f,readFileCache:y(p()),customSystemPrompt:h,appendSystemPrompt:g,userSpecifiedModel:_,fallbackModel:te,thinkingConfig:c,maxTurns:l,maxBudgetUsd:u,taskBudget:d,jsonSchema:ne,verbose:s,handleElicitation:C,replayUserMessages:x,includePartialMessages:S,setSDKStatus:T,abortController:b,orphanedPermission:ie});try{yield*E.submitMessage(t,{uuid:n,isMeta:r})}finally{m(E.getReadFileState())}}export{qe as a,Z as i,$e as n,X as r,Q as t};
|
|
1
|
+
import{a as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,o as n,s as r}from"./envUtils-QyzA_cFM.js";import{n as i,t as a}from"./defineProperty-C-QyHrDq.js";import{Kr as o,qr as s}from"./src-BX54x08P.js";import{X as c,d as l,m as u,q as d}from"./settings-CA-5Px85.js";import{Ft as ee,K as f,Pt as p,at as m,ft as h,gt as g,rt as _}from"./state-CXY-q5gr.js";import{Aa as te,Cb as ne,Ds as v,Es as re,Gv as y,Hv as b,I_ as x,Ia as S,Kr as C,L_ as w,MC as T,Mi as ie,Pi as E,Q as D,Qn as O,R_ as ae,Ra as oe,SS as k,Sb as se,Ts as ce,Up as A,Vp as j,Vv as M,Xi as le,Xs as ue,Xu as de,YS as fe,Ys as N,Z as pe,_n as P,_v as F,_w as I,bC as me,ct as he,gv as ge,hS as _e,ig as ve,kC as L,lt as ye,ma as be,py as xe,qS as Se,qu as R,qv as z,qx as Ce,ry as B,sg as V,tg as we,tt as Te,uw as H,vn as Ee,vr as De,vw as Oe,ws as ke,yC as Ae}from"./loadAgentsDir-CgDTTnMX.js";import{n as U,t as je}from"./cwd-DrEEb4f5.js";import{C as Me,S as Ne,d as W,o as Pe}from"./config-CMtnYZR9.js";import{i as Fe,o as Ie,q as Le}from"./log-D98mO6yJ.js";import{f as G,s as Re,v as ze}from"./model-BidsdFhX.js";import{at as K,bn as Be,nt as Ve,vn as He}from"./prompt-CduUPV0s.js";import{n as Ue,o as We,r as q}from"./MessageSelector-DuCpdn-Q.js";import{n as Ge,t as J}from"./systemTheme-Ceakddth.js";import{randomUUID as Y}from"crypto";n(),i(),o(),p(),U(),Ie(),u(),Me(),He(),W(),I(),T(),Ae(),k(),xe(),K(),z(),F(),V(),A(),N(),S(),le(),E(),De(),P(),D(),ye(),ae(),b(),G(),B(),R();async function Ke({tools:e,mainLoopModel:t,additionalWorkingDirectories:n,mcpClients:r,customSystemPrompt:i}){let[a,o,s]=await Promise.all([i===void 0?he(e,t,n,r):Promise.resolve([]),w(),i===void 0?x():Promise.resolve({})]);return{defaultSystemPrompt:a,userContext:o,systemContext:s}}async function qe({tools:e,commands:t,mcpClients:n,messages:r,readFileState:i,getAppState:a,setAppState:o,customSystemPrompt:s,appendSystemPrompt:c,thinkingConfig:l,agents:u}){let d=Re(),ee=a(),{defaultSystemPrompt:f,userContext:p,systemContext:m}=await Ke({tools:e,mainLoopModel:d,additionalWorkingDirectories:Array.from(ee.toolPermissionContext.additionalWorkingDirectories.keys()),mcpClients:n,customSystemPrompt:s}),h=Se([...s===void 0?f:[s],...c?[c]:[]]),g=r.at(-1),_=g?.type===`assistant`&&g.message.stop_reason===null?r.slice(0,-1):r;return{systemPrompt:h,userContext:p,systemContext:m,toolUseContext:{options:{commands:t,debug:!1,mainLoopModel:d,tools:e,verbose:!1,thinkingConfig:l??(de()===!1?{type:`disabled`}:{type:`adaptive`}),mcpClients:n,mcpResources:{},isNonInteractiveSession:!0,agentDefinitions:{activeAgents:u,allAgents:[]},customSystemPrompt:s,appendSystemPrompt:c},abortController:M(),readFileState:i,getAppState:a,setAppState:o,messages:_,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:()=>{},updateAttributionState:()=>{}},forkContextMessages:_}}c(),se(),te(),J(),H();function X(e){return e.flatMap(e=>{if(!e)return[];switch(e.type){case`assistant`:return[{type:`assistant`,message:e.message,uuid:e.uuid,requestId:void 0,timestamp:new Date().toISOString()}];case`user`:return[{type:`user`,message:e.message,uuid:e.uuid??Y(),timestamp:e.timestamp??new Date().toISOString(),isMeta:e.isSynthetic}];default:return[]}})}function Je(e){let t=e.preservedSegment;return{trigger:e.trigger,pre_tokens:e.preTokens,...t&&{preserved_segment:{head_uuid:t.headUuid,anchor_uuid:t.anchorUuid,tail_uuid:t.tailUuid}}}}function Ye(e,t){let n=Ce({content:s(e).replace(/<local-command-stdout>([\s\S]*?)<\/local-command-stdout>/,`$1`).replace(/<local-command-stderr>([\s\S]*?)<\/local-command-stderr>/,`$1`).trim()});return{type:`assistant`,content:n.message?.content,message:n.message,parent_tool_use_id:null,session_id:m(),uuid:t}}function Z(e){if(e)return{type:`rate_limit`,status:e.status,...e.resetsAt!==void 0&&{resetsAt:e.resetsAt},...e.rateLimitType!==void 0&&{rateLimitType:e.rateLimitType},...e.utilization!==void 0&&{utilization:e.utilization},...e.overageStatus!==void 0&&{overageStatus:e.overageStatus},...e.overageResetsAt!==void 0&&{overageResetsAt:e.overageResetsAt},...e.overageDisabledReason!==void 0&&{overageDisabledReason:e.overageDisabledReason},...e.isUsingOverage!==void 0&&{isUsingOverage:e.isUsingOverage},...e.surpassedThreshold!==void 0&&{surpassedThreshold:e.surpassedThreshold}}}p();function Xe(e){return e===`Agent`?d:e}function Ze(e){let t=l()?.outputStyle??`default`,n={type:`system`,subtype:`init`,cwd:je(),session_id:m(),tools:e.tools.map(e=>Xe(e.name)),mcp_servers:e.mcpClients.map(e=>({name:e.name,status:e.type})),model:e.model,permissionMode:e.permissionMode,slash_commands:e.commands.filter(e=>e.userInvocable!==!1).map(e=>e.name),apiKeySource:process.env.ANTHROPIC_API_KEY?`ANTHROPIC_API_KEY`:`none`,betas:_(),claude_code_version:`0.0.31`,output_style:t,agents:e.agents.map(e=>e.agentType),skills:e.skills.filter(e=>e.userInvocable!==!1).map(e=>e.name),plugins:e.plugins.map(e=>({name:e.name,path:e.path,source:e.source})),uuid:Y()};return n.fast_mode_state=L(e.model,e.fastMode),n}p(),o(),Le(),b(),U(),T(),le(),G(),B(),R(),ce();var Qe=()=>{try{return q(),e(Ue)}catch{return null}},Q=class{constructor(e){a(this,`config`,void 0),a(this,`mutableMessages`,void 0),a(this,`abortController`,void 0),a(this,`permissionDenials`,void 0),a(this,`totalUsage`,void 0),a(this,`hasHandledOrphanedPermission`,!1),a(this,`readFileState`,void 0),a(this,`discoveredSkillNames`,new Set),a(this,`loadedNestedMemoryPaths`,new Set),this.config=e,this.mutableMessages=e.initialMessages??[],this.abortController=e.abortController??M(),this.permissionDenials=[],this.readFileState=e.readFileCache,this.totalUsage=fe}async*submitMessage(e,n){let{cwd:i,commands:a,tools:o,mcpClients:c,verbose:l=!1,thinkingConfig:u,maxTurns:d,maxBudgetUsd:p,taskBudget:_,canUseTool:te,customSystemPrompt:y,appendSystemPrompt:b,userSpecifiedModel:x,fallbackModel:S,jsonSchema:w,getAppState:T,setAppState:E,replayUserMessages:D=!1,includePartialMessages:ae=!1,agents:k=[],setSDKStatus:se,orphanedPermission:ce}=this.config;this.discoveredSkillNames.clear(),this.permissionDenials=[],ne(i);let A=!ee(),M=Date.now(),le=async(e,t,n,r,i,a)=>{let o=await te(e,t,n,r,i,a);return o.behavior!==`allow`&&this.permissionDenials.push({type:`permission_denial`,tool_name:Xe(e.name),tool_use_id:i,tool_input:t}),o},N=T(),P=x?ze(x):Re(),F=u||(de()===!1?{type:`disabled`}:{type:`adaptive`});j(`before_getSystemPrompt`);let I=typeof y==`string`?y:void 0,{defaultSystemPrompt:he,userContext:ye,systemContext:xe}=await Ke({tools:o,mainLoopModel:P,additionalWorkingDirectories:Array.from(N.toolPermissionContext.additionalWorkingDirectories.keys()),mcpClients:c,customSystemPrompt:I});j(`after_getSystemPrompt`);let R={...ye},z=I!==void 0&&Ne()?await Oe():null,Ce=Se([...I===void 0?he:[I],...z?[z]:[],...b?[b]:[]]),B=o.some(e=>Be(e,Ve));w&&B&&Ee(E,m());let V={messages:this.mutableMessages,setMessages:e=>{this.mutableMessages=e(this.mutableMessages)},onChangeAPIKey:()=>{},handleElicitation:this.config.handleElicitation,options:{commands:a,debug:!1,tools:o,verbose:l,mainLoopModel:P,thinkingConfig:F,mcpClients:c,mcpResources:{},isNonInteractiveSession:!0,customSystemPrompt:y,appendSystemPrompt:b,agentDefinitions:{activeAgents:k,allAgents:[]},theme:Ge(Pe().theme),maxBudgetUsd:p},getAppState:T,setAppState:E,abortController:this.abortController,readFileState:this.readFileState,nestedMemoryAttachmentTriggers:new Set,loadedNestedMemoryPaths:this.loadedNestedMemoryPaths,dynamicSkillDirTriggers:new Set,discoveredSkillNames:this.discoveredSkillNames,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:e=>{E(t=>{let n=e(t.fileHistory);return n===t.fileHistory?t:{...t,fileHistory:n}})},updateAttributionState:e=>{E(t=>{let n=e(t.attribution);return n===t.attribution?t:{...t,attribution:n}})},setSDKStatus:se};if(ce&&!this.hasHandledOrphanedPermission){this.hasHandledOrphanedPermission=!0;for await(let e of ke(ce,o,this.mutableMessages,V))yield e}let{messages:H,shouldQuery:De,allowedTools:Ae,model:U,resultText:Me}=await We({input:e,mode:`prompt`,setToolJSX:()=>{},context:{...V,messages:this.mutableMessages},messages:this.mutableMessages,uuid:n?.uuid,isMeta:n?.isMeta,querySource:`sdk`});this.mutableMessages.push(...H);let W=[...this.mutableMessages];if(A&&H.length>0){let e=C(W);r()||(await e,(t(process.env.WORKMATE_EAGER_FLUSH)||t(process.env.WORKMATE_IS_COWORK))&&await O())}let Ie=Qe(),Le=H.filter(e=>e.type===`user`&&!e.isMeta&&!e.toolUseResult&&(Ie?.selectableUserMessagesFilter(e)??!0)||e.type===`system`&&e.subtype===`compact_boundary`),G=D?Le:[];E(e=>({...e,toolPermissionContext:{...e.toolPermissionContext,alwaysAllowRules:{...e.toolPermissionContext.alwaysAllowRules,command:Ae}}}));let K=U??P;V={messages:W,setMessages:()=>{},onChangeAPIKey:()=>{},handleElicitation:this.config.handleElicitation,options:{commands:a,debug:!1,tools:o,verbose:l,mainLoopModel:K,thinkingConfig:F,mcpClients:c,mcpResources:{},isNonInteractiveSession:!0,customSystemPrompt:y,appendSystemPrompt:b,theme:Ge(Pe().theme),agentDefinitions:{activeAgents:k,allAgents:[]},maxBudgetUsd:p},getAppState:T,setAppState:E,abortController:this.abortController,readFileState:this.readFileState,nestedMemoryAttachmentTriggers:new Set,loadedNestedMemoryPaths:this.loadedNestedMemoryPaths,dynamicSkillDirTriggers:new Set,discoveredSkillNames:this.discoveredSkillNames,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:V.updateFileHistoryState,updateAttributionState:V.updateAttributionState,setSDKStatus:se},j(`before_skills_plugins`);let[He,{enabled:Ue}]=await Promise.all([ie(je()),oe()]);if(j(`after_skills_plugins`),yield Ze({tools:o,mcpClients:c,model:K,permissionMode:N.toolPermissionContext.mode,commands:a,agents:k,skills:He,plugins:Ue,fastMode:N.fastMode}),j(`system_message_yielded`),!De){for(let e of H)if(e.type===`user`&&typeof e.message.content==`string`&&(e.message.content.includes(`<local-command-stdout>`)||e.message.content.includes(`<local-command-stderr>`)||e.isCompactSummary)&&(yield{type:`user`,message:{...e.message,content:s(e.message.content)},session_id:m(),parent_tool_use_id:null,uuid:e.uuid,timestamp:e.timestamp,isReplay:!e.isCompactSummary,isSynthetic:e.isMeta||e.isVisibleInTranscriptOnly}),e.type===`system`&&e.subtype===`local_command`&&typeof e.content==`string`&&(e.content.includes(`<local-command-stdout>`)||e.content.includes(`<local-command-stderr>`))&&(yield Ye(e.content,e.uuid)),e.type===`system`&&e.subtype===`compact_boundary`){let t=e;yield{type:`system`,subtype:`compact_boundary`,session_id:m(),uuid:e.uuid,compact_metadata:Je(t.compactMetadata)}}A&&(await C(W),(t(process.env.WORKMATE_EAGER_FLUSH)||t(process.env.WORKMATE_IS_COWORK))&&await O()),yield{type:`result`,subtype:`success`,is_error:!1,duration_ms:Date.now()-M,duration_api_ms:h(),num_turns:W.length-1,result:Me??``,stop_reason:null,session_id:m(),total_cost_usd:g(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:L(K,N.fastMode),uuid:Y()};return}if(we()&&A){let e=Qe()?.selectableUserMessagesFilter??(e=>!0);H.filter(e).forEach(e=>{ve(e=>{E(t=>({...t,fileHistory:e(t.fileHistory)}))},e.uuid)})}let q=fe,J=1,qe=!1,X,Z=null,Q=Fe().at(-1),$e=w?be(this.mutableMessages,Ve):0;for await(let e of ue({messages:W,systemPrompt:Ce,userContext:R,systemContext:xe,canUseTool:le,toolUseContext:V,fallbackModel:S,querySource:`sdk`,maxTurns:d,taskBudget:_})){if(e.type===`assistant`||e.type===`user`||e.type===`system`&&e.subtype===`compact_boundary`){if(A&&e.type===`system`&&e.subtype===`compact_boundary`){let t=e.compactMetadata?.preservedSegment?.tailUuid;if(t){let e=this.mutableMessages.findLastIndex(e=>e.uuid===t);e!==-1&&await C(this.mutableMessages.slice(0,e+1))}}if(W.push(e),A&&(e.type===`assistant`?C(W):await C(W)),!qe&&G.length>0){qe=!0;for(let e of G)e.type===`user`&&(yield{type:`user`,message:e.message,session_id:m(),parent_tool_use_id:null,uuid:e.uuid,timestamp:e.timestamp,isReplay:!0})}}switch(e.type===`user`&&J++,e.type){case`tombstone`:break;case`assistant`:{let t=e,n=t.message?.stop_reason;n!=null&&(Z=n),this.mutableMessages.push(t),yield*v(t);break}case`progress`:{let t=e;this.mutableMessages.push(t),A&&(W.push(t),C(W)),yield*v(t);break}case`user`:{let t=e;this.mutableMessages.push(t),yield*v(t);break}case`stream_event`:{let t=e.event;if(t.type===`message_start`){q=fe;let e=t.message;q=Te(q,e.usage)}if(t.type===`message_delta`){q=Te(q,t.usage);let e=t.delta;e.stop_reason!=null&&(Z=e.stop_reason)}t.type===`message_stop`&&(this.totalUsage=pe(this.totalUsage,q)),ae&&(yield{type:`stream_event`,event:t,session_id:m(),parent_tool_use_id:null,uuid:Y()});break}case`attachment`:{let n=e;this.mutableMessages.push(n),A&&(W.push(n),C(W));let r=n.attachment;if(r.type===`structured_output`)X=r.data;else if(r.type===`max_turns_reached`){A&&(t(process.env.WORKMATE_EAGER_FLUSH)||t(process.env.WORKMATE_IS_COWORK))&&await O(),yield{type:`result`,subtype:`error_max_turns`,duration_ms:Date.now()-M,duration_api_ms:h(),is_error:!0,num_turns:r.turnCount,stop_reason:Z,session_id:m(),total_cost_usd:g(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:L(K,N.fastMode),uuid:Y(),errors:[`Reached maximum number of turns (${r.maxTurns})`]};return}else D&&r.type===`queued_command`&&(yield{type:`user`,message:{role:`user`,content:r.prompt},session_id:m(),parent_tool_use_id:null,uuid:r.source_uuid||n.uuid,timestamp:n.timestamp,isReplay:!0});break}case`stream_request_start`:break;case`system`:{let t=e,n=this.config.snipReplay?.(t,this.mutableMessages);if(n!==void 0){n.executed&&(this.mutableMessages.length=0,this.mutableMessages.push(...n.messages));break}if(this.mutableMessages.push(t),t.subtype===`compact_boundary`&&t.compactMetadata){let e=t,n=this.mutableMessages.length-1;n>0&&this.mutableMessages.splice(0,n);let r=W.length-1;r>0&&W.splice(0,r),yield{type:`system`,subtype:`compact_boundary`,session_id:m(),uuid:t.uuid,compact_metadata:Je(e.compactMetadata)}}if(t.subtype===`api_error`){let e=t;yield{type:`system`,subtype:`api_retry`,attempt:e.retryAttempt,max_retries:e.maxRetries,retry_delay_ms:e.retryInMs,error_status:e.error.status??null,error:ge(e.error),session_id:m(),uuid:t.uuid}}break}case`tool_use_summary`:{let t=e;yield{type:`tool_use_summary`,summary:t.summary,preceding_tool_use_ids:t.precedingToolUseIds,session_id:m(),uuid:t.uuid};break}}if(p!==void 0&&g()>=p){A&&(t(process.env.WORKMATE_EAGER_FLUSH)||t(process.env.WORKMATE_IS_COWORK))&&await O(),yield{type:`result`,subtype:`error_max_budget_usd`,duration_ms:Date.now()-M,duration_api_ms:h(),is_error:!0,num_turns:J,stop_reason:Z,session_id:m(),total_cost_usd:g(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:L(K,N.fastMode),uuid:Y(),errors:[`Reached maximum budget ($${p}). Increase the limit with --max-budget-usd or start a new session.`]};return}if(e.type===`user`&&w){let e=be(this.mutableMessages,Ve)-$e,n=parseInt(process.env.MAX_STRUCTURED_OUTPUT_RETRIES||`5`,10);if(e>=n){A&&(t(process.env.WORKMATE_EAGER_FLUSH)||t(process.env.WORKMATE_IS_COWORK))&&await O(),yield{type:`result`,subtype:`error_max_structured_output_retries`,duration_ms:Date.now()-M,duration_api_ms:h(),is_error:!0,num_turns:J,stop_reason:Z,session_id:m(),total_cost_usd:g(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:L(K,N.fastMode),uuid:Y(),errors:[`Failed to provide valid structured output after ${n} attempts`]};return}}}let $=W.findLast(e=>e.type===`assistant`||e.type===`user`),et=$?.type??`undefined`,tt=$?.type===`assistant`?me($.message.content)?.type??`none`:`n/a`;if(A&&(t(process.env.WORKMATE_EAGER_FLUSH)||t(process.env.WORKMATE_IS_COWORK))&&await O(),!re($,Z)){yield{type:`result`,subtype:`error_during_execution`,duration_ms:Date.now()-M,duration_api_ms:h(),is_error:!0,num_turns:J,stop_reason:Z,session_id:m(),total_cost_usd:g(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,fast_mode_state:L(K,N.fastMode),uuid:Y(),errors:(()=>{let e=Fe(),t=Q?e.lastIndexOf(Q)+1:0;return[`[ede_diagnostic] result_type=${et} last_content_type=${tt} stop_reason=${Z}`,...e.slice(t).map(e=>e.error)]})()};return}let nt=``,rt=!1;if($.type===`assistant`){let e=me($.message.content);e?.type===`text`&&!_e.has(e.text)&&(nt=e.text),rt=!!$.isApiErrorMessage}yield{type:`result`,subtype:`success`,is_error:rt,duration_ms:Date.now()-M,duration_api_ms:h(),num_turns:J,result:nt,stop_reason:Z,session_id:m(),total_cost_usd:g(),usage:this.totalUsage,modelUsage:f(),permission_denials:this.permissionDenials,structured_output:X,fast_mode_state:L(K,N.fastMode),uuid:Y()}}interrupt(){this.abortController.abort()}resetAbortController(){this.abortController=M()}getAbortSignal(){return this.abortController.signal}getMessages(){return this.mutableMessages}getReadFileState(){return this.readFileState}getSessionId(){return m()}setModel(e){this.config.userSpecifiedModel=e}};async function*$e({commands:e,prompt:t,promptUuid:n,isMeta:r,cwd:i,tools:a,mcpClients:o,verbose:s=!1,thinkingConfig:c,maxTurns:l,maxBudgetUsd:u,taskBudget:d,canUseTool:ee,mutableMessages:f=[],getReadFileCache:p,setReadFileCache:m,customSystemPrompt:h,appendSystemPrompt:g,userSpecifiedModel:_,fallbackModel:te,jsonSchema:ne,getAppState:v,setAppState:re,abortController:b,replayUserMessages:x=!1,includePartialMessages:S=!1,handleElicitation:C,agents:w=[],setSDKStatus:T,orphanedPermission:ie}){let E=new Q({cwd:i,tools:a,commands:e,mcpClients:o,agents:w??[],canUseTool:ee,getAppState:v,setAppState:re,initialMessages:f,readFileCache:y(p()),customSystemPrompt:h,appendSystemPrompt:g,userSpecifiedModel:_,fallbackModel:te,thinkingConfig:c,maxTurns:l,maxBudgetUsd:u,taskBudget:d,jsonSchema:ne,verbose:s,handleElicitation:C,replayUserMessages:x,includePartialMessages:S,setSDKStatus:T,abortController:b,orphanedPermission:ie});try{yield*E.submitMessage(t,{uuid:n,isMeta:r})}finally{m(E.getReadFileState())}}export{qe as a,Z as i,$e as n,X as r,Q as t};
|