@readmagic/workmate 0.0.26 → 0.0.28

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.
Files changed (340) hide show
  1. package/dist/chunks/{AddWorkspaceDirectory-mS8iUoWY.js → AddWorkspaceDirectory-Bmgh8VS3.js} +1 -1
  2. package/dist/chunks/{AgentsMdExternalIncludesDialog-BHBkysy0.js → AgentsMdExternalIncludesDialog-BJfHqScU.js} +1 -1
  3. package/dist/chunks/AgentsMdExternalIncludesDialog-BjbUilCE.js +1 -0
  4. package/dist/chunks/{App-D--vtCyq.js → App-COdpsR2w.js} +1 -1
  5. package/dist/chunks/BackgroundTasksDialog-WkoL4g5Q.js +2 -0
  6. package/dist/chunks/{BypassPermissionsModeDialog-DyqI98d2.js → BypassPermissionsModeDialog-BT9yl0Qt.js} +1 -1
  7. package/dist/chunks/CustomSelect-t4wXuXWH.js +1 -0
  8. package/dist/chunks/{DiffDialog-BQAU2pJx.js → DiffDialog-CXZxnb7Y.js} +6 -6
  9. package/dist/chunks/Doctor-B6isid5K.js +1 -0
  10. package/dist/chunks/{Doctor-DJOMbSDE.js → Doctor-COj-tZBc.js} +2 -2
  11. package/dist/chunks/{ExitFlow-xBOnvhiW.js → ExitFlow-CcMYH5iI.js} +1 -1
  12. package/dist/chunks/{InvalidConfigDialog-NiuhcaG5.js → InvalidConfigDialog-riLYEaUP.js} +1 -1
  13. package/dist/chunks/{InvalidSettingsDialog-DrromC1I.js → InvalidSettingsDialog-BGXl3V1A.js} +1 -1
  14. package/dist/chunks/KeybindingProviderSetup-syiDgtpB.js +1 -0
  15. package/dist/chunks/MCPConnectionManager-C7RmKzJh.js +1 -0
  16. package/dist/chunks/MCPToolListView-CewNLJus.js +1 -0
  17. package/dist/chunks/{McpParsingWarnings-BYG2yqjO.js → McpParsingWarnings-Czze2JPd.js} +1 -1
  18. package/dist/chunks/MessageSelector-Kc6JlnDX.js +3 -0
  19. package/dist/chunks/Messages-BvFYO4Zn.js +10 -0
  20. package/dist/chunks/Onboarding-CD_Uv5h9.js +1 -0
  21. package/dist/chunks/{PermissionDialog-tEMMa5-a.js → PermissionDialog-DjCRuzSm.js} +1 -1
  22. package/dist/chunks/{PressEnterToContinue-CPOaYnym.js → PressEnterToContinue-DE1RxMX_.js} +1 -1
  23. package/dist/chunks/{PromptInputFooterSuggestions-CwqAsTI2.js → PromptInputFooterSuggestions-CHXJsTtQ.js} +1 -1
  24. package/dist/chunks/PromptInputHelpMenu-BZIVCV7V.js +1 -0
  25. package/dist/chunks/{ProviderSetup-J6Ty-Wj8.js → ProviderSetup-CwMvjmjh.js} +1 -1
  26. package/dist/chunks/QueryEngine-DAwfp_ht.js +1 -0
  27. package/dist/chunks/REPL-CtFtb35A.js +124 -0
  28. package/dist/chunks/REPL-tFT1FGQF.js +1 -0
  29. package/dist/chunks/{ResumeConversation-Cmsbo5m7.js → ResumeConversation-CERzSBvg.js} +1 -1
  30. package/dist/chunks/{SearchBox-DQBLKyzJ.js → SearchBox-zA5QwIpO.js} +1 -1
  31. package/dist/chunks/SearchExtraToolsTool-ndh4aEwQ.js +1 -0
  32. package/dist/chunks/Settings-CPaqWNdP.js +2 -0
  33. package/dist/chunks/Spinner-C0qHjfIY.js +1 -0
  34. package/dist/chunks/SpinnerGlyph-BR_SiV9L.js +1 -0
  35. package/dist/chunks/{TextInput-BboKIug2.js → TextInput-ou7ZhpVY.js} +7 -7
  36. package/dist/chunks/{ThemePicker-DTpXbEY0.js → ThemePicker-CVFWqSc7.js} +1 -1
  37. package/dist/chunks/TrustDialog-CGXv_LF4.js +1 -0
  38. package/dist/chunks/{ValidationErrorsList-C_gDQfm1.js → ValidationErrorsList-CKeHoN2Z.js} +1 -1
  39. package/dist/chunks/{_baseEach-DGbaIpJA.js → _baseEach-BYhqv77g.js} +1 -1
  40. package/dist/chunks/{add-dir-B576wzi9.js → add-dir-BSizpuef.js} +1 -1
  41. package/dist/chunks/{agentDisplay-ZuFoBZYu.js → agentDisplay-JKfYFD1m.js} +1 -1
  42. package/dist/chunks/{agents-Dy4_hDic.js → agents-BDTCH6YB.js} +1 -1
  43. package/dist/chunks/agents-MEaV8P2G.js +101 -0
  44. package/dist/chunks/allErrors-Dhnf6rqg.js +1 -0
  45. package/dist/chunks/{appleTerminalBackup-C9kjzdM9.js → appleTerminalBackup-CN8kS74J.js} +1 -1
  46. package/dist/chunks/backgroundHousekeeping-Bu-zRFCx.js +1 -0
  47. package/dist/chunks/{backgroundHousekeeping-PyLNnGdw.js → backgroundHousekeeping-CsXlkIg3.js} +1 -1
  48. package/dist/chunks/banner-BKOzHotb.js +2 -0
  49. package/dist/chunks/branch-BllXcYwS.js +2 -0
  50. package/dist/chunks/{break-cache-DL95nKZl.js → break-cache-B1nuWtD_.js} +2 -2
  51. package/dist/chunks/bridgeControl-aDnUrYZR.js +2 -0
  52. package/dist/chunks/{btw-Y44ctueB.js → btw-DzaRBa6o.js} +1 -1
  53. package/dist/chunks/bundledMode-D9omqD3L.js +2 -0
  54. package/dist/chunks/caches-CMF-MmR-.js +1 -0
  55. package/dist/chunks/caches-CW5YnYNS.js +1 -0
  56. package/dist/chunks/channel-DVx21qde.js +1 -0
  57. package/dist/chunks/channel-Gw6skpUh.js +1 -0
  58. package/dist/chunks/{clear-DtTkA707.js → clear-CDQs9_5P.js} +1 -1
  59. package/dist/chunks/{client-aJ2Nr_sh.js → client-2w-g5kMx.js} +1 -1
  60. package/dist/chunks/client-B0ngS4Uu.js +1 -0
  61. package/dist/chunks/client-BP4DOH3K.js +1 -0
  62. package/dist/chunks/{client-Bw_L3lSc.js → client-pA7fKk0-.js} +1 -1
  63. package/dist/chunks/commands-CfYMwgP7.js +1 -0
  64. package/dist/chunks/{compact-CvNOtu7J.js → compact-6F2tuItE.js} +1 -1
  65. package/dist/chunks/config-BDkzWBnL.js +1 -0
  66. package/dist/chunks/config-Bio2EjUK.js +3 -0
  67. package/dist/chunks/config-C_AEhZrn.js +1 -0
  68. package/dist/chunks/{context-Opu4E8dL.js → context-TkdzCK3Y.js} +1 -1
  69. package/dist/chunks/{context-noninteractive-B1V2Mp26.js → context-noninteractive-BcBo64vo.js} +9 -9
  70. package/dist/chunks/context-noninteractive-oFcnY1Er.js +1 -0
  71. package/dist/chunks/{conversation-CG_z7TLE.js → conversation-CYZyg1U1.js} +1 -1
  72. package/dist/chunks/conversation-DXzlRhNw.js +1 -0
  73. package/dist/chunks/conversationRecovery-_hWC7JBO.js +1 -0
  74. package/dist/chunks/crossProjectResume-CCo3iZrB.js +40 -0
  75. package/dist/chunks/{debug-kBjDaVkQ.js → debug-2pVES-2G.js} +1 -1
  76. package/dist/chunks/detectRepository--luIRv5H.js +1 -0
  77. package/dist/chunks/{diff-Cv7tX2-P.js → diff-BzVUPO4Z.js} +1 -1
  78. package/dist/chunks/directoryCompletion-BC0qRmrz.js +1 -0
  79. package/dist/chunks/doctor-B4jQbGQr.js +1 -0
  80. package/dist/chunks/entry-333L52Lo.js +13 -0
  81. package/dist/chunks/{envUtils-DZ_SvEVz.js → envUtils-QyzA_cFM.js} +1 -1
  82. package/dist/chunks/{execFileNoThrow-BfZFnCGa.js → execFileNoThrow-DXSEj8ZO.js} +1 -1
  83. package/dist/chunks/{exit-OKEV_ddw.js → exit-D5DYnRvR.js} +1 -1
  84. package/dist/chunks/{extraUsage-BlRL3yeb.js → extraUsage-CmgRR-zH.js} +1 -1
  85. package/dist/chunks/extractMemories-CVUrBFMj.js +1 -0
  86. package/dist/chunks/fast-CRhW9zha.js +1 -0
  87. package/dist/chunks/fast-D7oNjaZ3.js +1 -0
  88. package/dist/chunks/fetchModelList-Cv1vWIpC.js +1 -0
  89. package/dist/chunks/fetchModelList-DIa1HwAJ.js +1 -0
  90. package/dist/chunks/fileSuggestions-DF3HTRKr.js +3 -0
  91. package/dist/chunks/{fpsMetrics-Ixd0J4CH.js → fpsMetrics-DIpm2-xw.js} +1 -1
  92. package/dist/chunks/{gemini-BfVyavwQ.js → gemini-ou7_YyXc.js} +1 -1
  93. package/dist/chunks/generateSessionName-CeN9EZNY.js +1 -0
  94. package/dist/chunks/{genericProcessUtils-CVtQOTO2.js → genericProcessUtils-GqURdVAv.js} +1 -1
  95. package/dist/chunks/{goal-BidR-GFa.js → goal-CCxo4Wyf.js} +1 -1
  96. package/dist/chunks/{grok-DLcuI-U7.js → grok-BMmUcNbI.js} +1 -1
  97. package/dist/chunks/{help-CZuvYhXj.js → help-CYtogTZk.js} +1 -1
  98. package/dist/chunks/{history-BxPGftQw.js → history-CUrqO9rV.js} +1 -1
  99. package/dist/chunks/{hooks-ehqfAM5F.js → hooks-ByVkvodY.js} +2 -2
  100. package/dist/chunks/hooks-CBGUcyCs.js +1 -0
  101. package/dist/chunks/install-DIxyfdXG.js +1 -0
  102. package/dist/chunks/{instrumentation-B9bfF2mA.js → instrumentation-BmHivmxs.js} +4 -4
  103. package/dist/chunks/{job-Coztdn6A.js → job-D534P26R.js} +1 -1
  104. package/dist/chunks/{keybindings-DwSdLpaE.js → keybindings-CxgQqQJe.js} +1 -1
  105. package/dist/chunks/{launchLocalMemory-DRzfpIOB.js → launchLocalMemory-CWXLb3KF.js} +1 -1
  106. package/dist/chunks/{launchOnboarding-D2zFCJf-.js → launchOnboarding-CocPmwzz.js} +1 -1
  107. package/dist/chunks/loadAgentsDir-Zw648oQO.js +1 -0
  108. package/dist/chunks/{loadAgentsDir-DR5PVAc3.js → loadAgentsDir-bmpKLPdG.js} +483 -483
  109. package/dist/chunks/{loadPluginHooks-BiQgGfUJ.js → loadPluginHooks-BIfM53-_.js} +1 -1
  110. package/dist/chunks/loader-BMAtuwRa.js +1 -0
  111. package/dist/chunks/{localSearch-CzkxDuOR.js → localSearch-Da8cVYoI.js} +1 -1
  112. package/dist/chunks/localSearch-Dbj8cXyO.js +1 -0
  113. package/dist/chunks/{log-DWZny1vM.js → log-L1kqxa_P.js} +1 -1
  114. package/dist/chunks/{logoUtils-DR5T0pr3.js → logoUtils-qNuBc2nI.js} +1 -1
  115. package/dist/chunks/{magicDocs-BwBxjfLo.js → magicDocs-BsEiBLQl.js} +2 -2
  116. package/dist/chunks/{main-Ryi27wYq.js → main-B31aPMPP.js} +34 -34
  117. package/dist/chunks/managedEnv-DCGLDTP_.js +1 -0
  118. package/dist/chunks/{managedEnv-Do9fgLpk.js → managedEnv-EZ2IirNa.js} +1 -1
  119. package/dist/chunks/{managedEnvConstants-CWcT7nYr.js → managedEnvConstants-BPY8yF1A.js} +1 -1
  120. package/dist/chunks/{mcp-CZBTxbhu.js → mcp-BMeWtYCx.js} +1 -1
  121. package/dist/chunks/{mcp-BCpnF6wD.js → mcp-CYbesbfl.js} +1 -1
  122. package/dist/chunks/mcp-Dd8TBfQQ.js +5 -0
  123. package/dist/chunks/memory-DtQQGyPS.js +1 -0
  124. package/dist/chunks/{modalContext-CBE8xuck.js → modalContext-sU2lfR08.js} +1 -1
  125. package/dist/chunks/{mode-wq70cR44.js → mode-SM8doWgC.js} +1 -1
  126. package/dist/chunks/{model-DVk9-2dk.js → model-C2r-PaR4.js} +1 -1
  127. package/dist/chunks/model-Dd3x121y.js +1 -0
  128. package/dist/chunks/modelOptions-BQL4gbNk.js +1 -0
  129. package/dist/chunks/nativeInstaller-DMkZdsof.js +1 -0
  130. package/dist/chunks/{notifications-dGBuNvFj.js → notifications-BwS1XsnZ.js} +1 -1
  131. package/dist/chunks/{observationStore-D0rm3GhP.js → observationStore-pnSSxec_.js} +1 -1
  132. package/dist/chunks/{onChangeAppState-B4K-rSaF.js → onChangeAppState-C9cYQJPF.js} +1 -1
  133. package/dist/chunks/{openai-DAwnAV9K.js → openai-Bea4I2Od.js} +1 -1
  134. package/dist/chunks/{overlayContext-B6i_6y_0.js → overlayContext-C5WPACKC.js} +1 -1
  135. package/dist/chunks/{panel-C0CF3noE.js → panel-DNiXDhBX.js} +1 -1
  136. package/dist/chunks/{parser-DThLwgdM.js → parser-CTnaXFVJ.js} +1 -1
  137. package/dist/chunks/parser-Diihup2V.js +1 -0
  138. package/dist/chunks/{partition-BRQHofxD.js → partition-CKgWl7p4.js} +1 -1
  139. package/dist/chunks/{pasteStore-BmehVo5j.js → pasteStore-njJCBMKr.js} +1 -1
  140. package/dist/chunks/permissions-Dv_PCfY0.js +3 -0
  141. package/dist/chunks/pidLock-CqkC3-nD.js +3 -0
  142. package/dist/chunks/{plan-B6U3ioer.js → plan-Ce6wfjjI.js} +1 -1
  143. package/dist/chunks/plugin-aK4tDrVg.js +17 -0
  144. package/dist/chunks/pluginAutoupdate-ByokIVEs.js +1 -0
  145. package/dist/chunks/{pluginBlocklist-DAoUENwc.js → pluginBlocklist-ByRQaVPu.js} +1 -1
  146. package/dist/chunks/{pluginCliCommands-CaHnj0C_.js → pluginCliCommands-Dyk4HYHs.js} +1 -1
  147. package/dist/chunks/{pluginFlagging-BCj9LJP3.js → pluginFlagging-B2ZX5_oB.js} +1 -1
  148. package/dist/chunks/pluginOperations-BCvJvfOC.js +2 -0
  149. package/dist/chunks/pluginStartupCheck-QG0d95dE.js +1 -0
  150. package/dist/chunks/pluginStartupCheck-o_TC7wIt.js +1 -0
  151. package/dist/chunks/{plugins-D7zyI9c4.js → plugins-DzsTDNWJ.js} +1 -1
  152. package/dist/chunks/{poorMode-Ocff_UT1.js → poorMode-CG2JNTD0.js} +1 -1
  153. package/dist/chunks/poorMode-eMIFCAC_.js +1 -0
  154. package/dist/chunks/print-dUT7E1g9.js +13 -0
  155. package/dist/chunks/processBashCommand-DtGCgTkF.js +1 -0
  156. package/dist/chunks/processSlashCommand-wXblpK2C.js +5 -0
  157. package/dist/chunks/{projectContext-QN5U3Ggr.js → projectContext-BFfHgAMh.js} +1 -1
  158. package/dist/chunks/{projectContext-COeHKDrk.js → projectContext-DnJHynXv.js} +1 -1
  159. package/dist/chunks/{projectOnboardingState-KqcpRXls.js → projectOnboardingState-D-_ijZnG.js} +1 -1
  160. package/dist/chunks/prompt-BdH2zk0S.js +1 -0
  161. package/dist/chunks/{prompt-CTByhpUI.js → prompt-BnDapYGL.js} +8 -8
  162. package/dist/chunks/prompt-D0TFER0A.js +1 -0
  163. package/dist/chunks/promptEditor-14TB3MYt.js +4 -0
  164. package/dist/chunks/protocolHandler-CJO3CRYW.js +13 -0
  165. package/dist/chunks/{proxy-BtWuysHM.js → proxy--_NfbJhm.js} +1 -1
  166. package/dist/chunks/reconciler-C_HKsocm.js +1 -0
  167. package/dist/chunks/{refresh-B4pqFp12.js → refresh-Cm4jZzLa.js} +1 -1
  168. package/dist/chunks/reject-Tug1RmkE.js +1 -0
  169. package/dist/chunks/{reload-plugins-DXQqk7q6.js → reload-plugins-CL9LWzpq.js} +1 -1
  170. package/dist/chunks/{rename-D4XBmTBI.js → rename-OfKJSazJ.js} +1 -1
  171. package/dist/chunks/{renderOptions-DkP98P_d.js → renderOptions-B0RFpjRI.js} +1 -1
  172. package/dist/chunks/{resume-DzIev0JI.js → resume-BZ42SpS2.js} +1 -1
  173. package/dist/chunks/ripgrep-67m14ImZ.js +5 -0
  174. package/dist/chunks/ripgrep-DB7KB8RZ.js +1 -0
  175. package/dist/chunks/{runtimeObserver-BUHs3qjs.js → runtimeObserver-BLq2guVy.js} +1 -1
  176. package/dist/chunks/{runtimeObserver-BPqlbu0B.js → runtimeObserver-DT5P2_XL.js} +2 -2
  177. package/dist/chunks/sandbox-adapter-982rx2cm.js +1 -0
  178. package/dist/chunks/sandbox-toggle-DghmaJhK.js +1 -0
  179. package/dist/chunks/searchExtraTools-B4N1bpy0.js +1 -0
  180. package/dist/chunks/select-CaxQ-BVq.js +1 -0
  181. package/dist/chunks/sessionFileAccessHooks-BqQ58T7e.js +1 -0
  182. package/dist/chunks/{sessionObserver-B6xzxckA.js → sessionObserver-DBoZUvWL.js} +1 -1
  183. package/dist/chunks/sessionObserver-qYpA90El.js +1 -0
  184. package/dist/chunks/sessionStorage-CC0v4zMs.js +1 -0
  185. package/dist/chunks/sessionTracing-5a7HDF4e.js +11 -0
  186. package/dist/chunks/settings-D4M13toi.js +104 -0
  187. package/dist/chunks/settings-Dfit5gGT.js +1 -0
  188. package/dist/chunks/setup-DVLnIlse.js +3 -0
  189. package/dist/chunks/{shadowedRuleDetection-D6R2OeoH.js → shadowedRuleDetection-L3tnySui.js} +1 -1
  190. package/dist/chunks/{sideQuestion-5jcbOMsR.js → sideQuestion-BJTVma-5.js} +1 -1
  191. package/dist/chunks/sinks-C9NdbjLo.js +1 -0
  192. package/dist/chunks/{sinks-B-kFqjjd.js → sinks-CV0SWuZW.js} +1 -1
  193. package/dist/chunks/{skillChangeDetector-103-nEle.js → skillChangeDetector-DlodgOyC.js} +1 -1
  194. package/dist/chunks/{skillGapStore-DOz1KCqo.js → skillGapStore-Cposc03e.js} +2 -2
  195. package/dist/chunks/{skillLifecycle-D9NkIwFQ.js → skillLifecycle-RXQp0JU7.js} +2 -2
  196. package/dist/chunks/{skillSearchPanel-DFiSZaJ4.js → skillSearchPanel-B2pjskqk.js} +2 -2
  197. package/dist/chunks/skills-D2ZjMtv4.js +1 -0
  198. package/dist/chunks/sleep-xKMbXTJe.js +1 -0
  199. package/dist/chunks/{src-WZ94ZKI3.js → src-BX54x08P.js} +1 -1
  200. package/dist/chunks/{src-Cy5_qH26.js → src-HB5wLari.js} +1 -1
  201. package/dist/chunks/{startupProfiler-DIM_Ihyp.js → startupProfiler-B9Qv2QGH.js} +1 -1
  202. package/dist/chunks/startupProfiler-DWcM4QBl.js +1 -0
  203. package/dist/chunks/{staticRender-RHUIg5ln.js → staticRender-Bt82RvGc.js} +1 -1
  204. package/dist/chunks/status-BcSkj9nE.js +1 -0
  205. package/dist/chunks/{statusNoticeHelpers-DI45AH-c.js → statusNoticeHelpers-DsrqBOQt.js} +1 -1
  206. package/dist/chunks/{stringUtils-D_xPrwGQ.js → stringUtils-Cs6E5f-B.js} +1 -1
  207. package/dist/chunks/switcher-BietN6il.js +1 -0
  208. package/dist/chunks/{switcher-DhZCaAun.js → switcher-rep86o4_.js} +1 -1
  209. package/dist/chunks/{tasks-6suPhqsK.js → tasks-B4coTfrq.js} +1 -1
  210. package/dist/chunks/{templateJobs-BKVEWCsb.js → templateJobs-C5ukh6H3.js} +7 -7
  211. package/dist/chunks/{terminalSetup-7PUR4hfo.js → terminalSetup-CaGbEVjB.js} +1 -1
  212. package/dist/chunks/{terminalSetup-Cqy5_PhJ.js → terminalSetup-xe_P98fY.js} +4 -4
  213. package/dist/chunks/{theme-B-HG2PUs.js → theme-7RmvErYJ.js} +1 -1
  214. package/dist/chunks/tipRegistry-BYpJZIjR.js +2 -0
  215. package/dist/chunks/{toolEventObserver-BY3QVnr6.js → toolEventObserver-Dzwzi5Vi.js} +1 -1
  216. package/dist/chunks/{toolPool-BcwIF8Q_.js → toolPool-BGfiNj6h.js} +1 -1
  217. package/dist/chunks/{udsClient-CCxgLiZy.js → udsClient-CWeoNrm3.js} +1 -1
  218. package/dist/chunks/{useDoublePress-DQBLKyzJ.js → useDoublePress-zA5QwIpO.js} +1 -1
  219. package/dist/chunks/{useExitOnCtrlCDWithKeybindings-BgJrnuDl.js → useExitOnCtrlCDWithKeybindings-BT0nexZw.js} +1 -1
  220. package/dist/chunks/useMainLoopModel-QuE7VkgX.js +1 -0
  221. package/dist/chunks/useManagePlugins-pGaGzsEg.js +1 -0
  222. package/dist/chunks/useMergedTools-BLsIT3R_.js +1 -0
  223. package/dist/chunks/{useSearchInput-BITV_Txn.js → useSearchInput-j12K4wEo.js} +1 -1
  224. package/dist/chunks/{useSettingsErrors-CO0fTNzn.js → useSettingsErrors-C8VIzdws.js} +1 -1
  225. package/dist/chunks/util-CCEK8oze.js +1 -0
  226. package/dist/chunks/validatePlugin-CTVnWx9H.js +1 -0
  227. package/dist/chunks/{vim-qgMS88ss.js → vim-BlO9V5_5.js} +1 -1
  228. package/dist/chunks/worktree-BWL0vR4o.js +1 -0
  229. package/dist/chunks/wrapper-B-Q3Illb.js +1 -0
  230. package/dist/chunks/{wrapper-K8ZapJVu.js → wrapper-DVKxC5fR.js} +1 -1
  231. package/dist/cli.js +1 -1
  232. package/package.json +3 -2
  233. package/dist/chunks/AgentsMdExternalIncludesDialog-DuStmCjj.js +0 -1
  234. package/dist/chunks/BackgroundTasksDialog-mcDuiNGs.js +0 -2
  235. package/dist/chunks/CustomSelect-CpMbxYbt.js +0 -1
  236. package/dist/chunks/Doctor-BU69VQzw.js +0 -1
  237. package/dist/chunks/KeybindingProviderSetup-CSUkJHTT.js +0 -1
  238. package/dist/chunks/MCPConnectionManager-Bn1PDn3R.js +0 -1
  239. package/dist/chunks/MCPToolListView-BRxjOaOL.js +0 -1
  240. package/dist/chunks/MessageSelector-B7xAQqZI.js +0 -3
  241. package/dist/chunks/Messages-CxMsfjOa.js +0 -10
  242. package/dist/chunks/Onboarding-CkATe87e.js +0 -1
  243. package/dist/chunks/PromptInputHelpMenu-krq-hiFO.js +0 -1
  244. package/dist/chunks/QueryEngine-Mdi_kUaL.js +0 -1
  245. package/dist/chunks/REPL-BgzQtSFF.js +0 -1
  246. package/dist/chunks/REPL-rirm6s_7.js +0 -124
  247. package/dist/chunks/SearchExtraToolsTool-D1-7C04z.js +0 -1
  248. package/dist/chunks/SelectMulti-BpAjjhsn.js +0 -1
  249. package/dist/chunks/Settings-B6DImvca.js +0 -2
  250. package/dist/chunks/Spinner-DhhSOFcN.js +0 -1
  251. package/dist/chunks/SpinnerGlyph-CmVXC-_9.js +0 -1
  252. package/dist/chunks/TrustDialog-CZ8JpySm.js +0 -1
  253. package/dist/chunks/agents-HIOBiw4w.js +0 -101
  254. package/dist/chunks/allErrors-CxPNR2WN.js +0 -1
  255. package/dist/chunks/backgroundHousekeeping-ZCMPmQuU.js +0 -1
  256. package/dist/chunks/banner-DqFectPg.js +0 -2
  257. package/dist/chunks/branch-B_BL5N9N.js +0 -2
  258. package/dist/chunks/bundledMode-BxyD5cqq.js +0 -1
  259. package/dist/chunks/caches-5xZ4dSXt.js +0 -1
  260. package/dist/chunks/caches-Be9saXxV.js +0 -1
  261. package/dist/chunks/claudeDesktop-g8eUUY2E.js +0 -1
  262. package/dist/chunks/client-mnUISv_N.js +0 -1
  263. package/dist/chunks/client-wPqIdEVm.js +0 -1
  264. package/dist/chunks/commands-wfE12a4L.js +0 -1
  265. package/dist/chunks/config-D3K87Mm1.js +0 -3
  266. package/dist/chunks/config-DTga6Ku8.js +0 -1
  267. package/dist/chunks/config-DtmqWusU.js +0 -1
  268. package/dist/chunks/context-noninteractive-eIlneYiL.js +0 -1
  269. package/dist/chunks/conversation-CHesBfFZ.js +0 -1
  270. package/dist/chunks/conversationRecovery-OhitW-7g.js +0 -1
  271. package/dist/chunks/crossProjectResume-mmYx8PrZ.js +0 -40
  272. package/dist/chunks/detectRepository-M6K2wc7h.js +0 -1
  273. package/dist/chunks/directoryCompletion-BHyjyKAM.js +0 -1
  274. package/dist/chunks/doctor-DeBG5SL5.js +0 -1
  275. package/dist/chunks/entry-CbhyIWgj.js +0 -13
  276. package/dist/chunks/extractMemories-jnsv-_n_.js +0 -1
  277. package/dist/chunks/fast-4I_qPJCd.js +0 -1
  278. package/dist/chunks/fast-DiolM1M7.js +0 -1
  279. package/dist/chunks/fetchModelList-BRFTQim4.js +0 -1
  280. package/dist/chunks/fetchModelList-qPKAuu4m.js +0 -1
  281. package/dist/chunks/fileSuggestions-iWVXvvLB.js +0 -3
  282. package/dist/chunks/generateSessionName-CGaTTXCA.js +0 -1
  283. package/dist/chunks/hooks-Bg9WIjZQ.js +0 -1
  284. package/dist/chunks/install-ACGY0vhM.js +0 -1
  285. package/dist/chunks/loadAgentsDir-DqAbnpB-.js +0 -1
  286. package/dist/chunks/loader-6MqzNGmV.js +0 -1
  287. package/dist/chunks/localSearch-DW3JT2MA.js +0 -1
  288. package/dist/chunks/managedEnv-DCEJh3z3.js +0 -1
  289. package/dist/chunks/mcp-CJ6SDJEK.js +0 -6
  290. package/dist/chunks/memory-BQO6Y0ak.js +0 -1
  291. package/dist/chunks/model-D42epddJ.js +0 -1
  292. package/dist/chunks/modelOptions-beLgXORr.js +0 -1
  293. package/dist/chunks/nativeInstaller-ChGSz1lb.js +0 -1
  294. package/dist/chunks/parser-BZt0VFd_.js +0 -1
  295. package/dist/chunks/permissions-DkfWKN-B.js +0 -3
  296. package/dist/chunks/pidLock-YvAaIrIY.js +0 -3
  297. package/dist/chunks/platform-Vl9IynC3.js +0 -2
  298. package/dist/chunks/plugin-CTA2_-F7.js +0 -17
  299. package/dist/chunks/pluginAutoupdate-Dy5W3HWE.js +0 -1
  300. package/dist/chunks/pluginOperations-ClXNOOG6.js +0 -2
  301. package/dist/chunks/pluginStartupCheck-CiwMKGjx.js +0 -1
  302. package/dist/chunks/pluginStartupCheck-U8_xk25t.js +0 -1
  303. package/dist/chunks/poorMode-DtzWNhsY.js +0 -1
  304. package/dist/chunks/print-BzljdXem.js +0 -13
  305. package/dist/chunks/processBashCommand-RUkmyAl4.js +0 -1
  306. package/dist/chunks/processSlashCommand-DRLO-jNV.js +0 -5
  307. package/dist/chunks/prompt-DTpfW6yP.js +0 -1
  308. package/dist/chunks/prompt-D__eHY_5.js +0 -1
  309. package/dist/chunks/promptEditor-CpUFgGzc.js +0 -4
  310. package/dist/chunks/protocolHandler-BQSLVGnG.js +0 -13
  311. package/dist/chunks/reconciler-D6BUq8WB.js +0 -1
  312. package/dist/chunks/reject-C6IvUvBt.js +0 -1
  313. package/dist/chunks/ripgrep-CYP26Fhg.js +0 -1
  314. package/dist/chunks/ripgrep-D1f1pbCz.js +0 -5
  315. package/dist/chunks/sandbox-adapter-CumL75tU.js +0 -1
  316. package/dist/chunks/sandbox-toggle-CTtET6Xq.js +0 -1
  317. package/dist/chunks/searchExtraTools-BMCU2zEf.js +0 -1
  318. package/dist/chunks/select-FrwoTzuc.js +0 -1
  319. package/dist/chunks/sessionFileAccessHooks-WO8WTdT9.js +0 -1
  320. package/dist/chunks/sessionObserver-CBrM4opL.js +0 -1
  321. package/dist/chunks/sessionStorage-C1EAxDWG.js +0 -1
  322. package/dist/chunks/sessionTracing-UFK96PxT.js +0 -11
  323. package/dist/chunks/settings-BK6gCko-.js +0 -1
  324. package/dist/chunks/settings-YIDksG5Z.js +0 -24
  325. package/dist/chunks/setup-BBvZyrfz.js +0 -3
  326. package/dist/chunks/sinks-DB_D4lmu.js +0 -1
  327. package/dist/chunks/skills-DgeLr52a.js +0 -1
  328. package/dist/chunks/sleep-BbWr_FL1.js +0 -1
  329. package/dist/chunks/startupProfiler-FpGsKWYk.js +0 -1
  330. package/dist/chunks/status-CKLecQZV.js +0 -1
  331. package/dist/chunks/switcher-D2Z2ZNQ0.js +0 -1
  332. package/dist/chunks/tipRegistry-BR_lSGRw.js +0 -2
  333. package/dist/chunks/types-CD25a50S.js +0 -81
  334. package/dist/chunks/use-select-navigation-CW5alA9r.js +0 -1
  335. package/dist/chunks/useMainLoopModel-BVgJo4hN.js +0 -1
  336. package/dist/chunks/useManagePlugins-CrWjzESW.js +0 -1
  337. package/dist/chunks/useMergedTools-r6GQq5mI.js +0 -1
  338. package/dist/chunks/util-_zo3I1y8.js +0 -1
  339. package/dist/chunks/validatePlugin-DFGdRhA-.js +0 -1
  340. package/dist/chunks/worktree-CR_M6Qfy.js +0 -1
@@ -1,3 +1,3 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,P as n,t as r}from"./src-WZ94ZKI3.js";import{t as i}from"./jsx-runtime-Bb4Xn-E0.js";import{$c as a,Av as o,Fv as s,al as c,el as l,fl as u,il as d,ll as f,ml as p,nl as m,ol as h,pl as g,rl as _,sl as v,tl as y,ul as b}from"./loadAgentsDir-DR5PVAc3.js";import{t as x}from"./select-FrwoTzuc.js";import{t as S}from"./CustomSelect-CpMbxYbt.js";import{n as C,t as w}from"./PermissionDialog-tEMMa5-a.js";function T({currentGoal:e,newObjective:r,onConfirm:i,onCancel:a}){function o(e){e===`yes`?i():a()}let s=e.tokenBudget===null?`${e.tokensUsed}`:`${e.tokensUsed} / ${e.tokenBudget}`;return(0,E.jsx)(w,{color:`warning`,title:`Replace active goal?`,children:(0,E.jsxs)(t,{flexDirection:`column`,marginTop:1,paddingX:1,children:[(0,E.jsx)(n,{children:`A goal is already in progress. Replacing it will reset all progress and counters.`}),(0,E.jsxs)(t,{marginTop:1,flexDirection:`column`,children:[(0,E.jsx)(n,{dimColor:!0,children:`Current goal:`}),(0,E.jsxs)(n,{children:[(0,E.jsx)(n,{dimColor:!0,children:`· Objective: `}),e.objective]}),(0,E.jsxs)(n,{children:[(0,E.jsx)(n,{dimColor:!0,children:`· Status: `}),h(e.status)]}),(0,E.jsxs)(n,{children:[(0,E.jsx)(n,{dimColor:!0,children:`· Time: `}),c(e)]}),(0,E.jsxs)(n,{children:[(0,E.jsx)(n,{dimColor:!0,children:`· Tokens: `}),s]})]}),(0,E.jsxs)(t,{marginTop:1,flexDirection:`column`,children:[(0,E.jsx)(n,{dimColor:!0,children:`New objective:`}),(0,E.jsx)(n,{children:r})]}),(0,E.jsx)(t,{marginTop:1,children:(0,E.jsx)(x,{options:[{label:`Yes, replace the goal`,value:`yes`},{label:`No, keep the current goal`,value:`no`}],onChange:o,onCancel:a})})]})})}var E,D=e((()=>{r(),S(),C(),b(),E=i()}));function O(e){let t=e.split(`
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{$c as a,Av as o,Fv as s,al as c,el as l,fl as u,il as d,ll as f,ml as p,nl as m,ol as h,pl as g,rl as _,sl as v,tl as y,ul as b}from"./loadAgentsDir-bmpKLPdG.js";import{t as x}from"./select-CaxQ-BVq.js";import{t as S}from"./CustomSelect-t4wXuXWH.js";import{n as C,t as w}from"./PermissionDialog-DjCRuzSm.js";function T({currentGoal:e,newObjective:r,onConfirm:i,onCancel:a}){function o(e){e===`yes`?i():a()}let s=e.tokenBudget===null?`${e.tokensUsed}`:`${e.tokensUsed} / ${e.tokenBudget}`;return(0,E.jsx)(w,{color:`warning`,title:`Replace active goal?`,children:(0,E.jsxs)(t,{flexDirection:`column`,marginTop:1,paddingX:1,children:[(0,E.jsx)(n,{children:`A goal is already in progress. Replacing it will reset all progress and counters.`}),(0,E.jsxs)(t,{marginTop:1,flexDirection:`column`,children:[(0,E.jsx)(n,{dimColor:!0,children:`Current goal:`}),(0,E.jsxs)(n,{children:[(0,E.jsx)(n,{dimColor:!0,children:`· Objective: `}),e.objective]}),(0,E.jsxs)(n,{children:[(0,E.jsx)(n,{dimColor:!0,children:`· Status: `}),h(e.status)]}),(0,E.jsxs)(n,{children:[(0,E.jsx)(n,{dimColor:!0,children:`· Time: `}),c(e)]}),(0,E.jsxs)(n,{children:[(0,E.jsx)(n,{dimColor:!0,children:`· Tokens: `}),s]})]}),(0,E.jsxs)(t,{marginTop:1,flexDirection:`column`,children:[(0,E.jsx)(n,{dimColor:!0,children:`New objective:`}),(0,E.jsx)(n,{children:r})]}),(0,E.jsx)(t,{marginTop:1,children:(0,E.jsx)(x,{options:[{label:`Yes, replace the goal`,value:`yes`},{label:`No, keep the current goal`,value:`no`}],onChange:o,onCancel:a})})]})})}var E,D=e((()=>{r(),S(),C(),b(),E=i()}));function O(e){let t=e.split(`
2
2
  `)[0]??e;return t.length<=F?t:`${t.slice(0,F)}…`}function k(){s(e=>e.origin===`goal-continuation`||e.origin===`goal-budget-limit`)}function A(){let e=v();if(!e)return"No active goal. Set one with `/goal <objective>`.";let t=e.tokenBudget===null?`${e.tokensUsed}`:`${e.tokensUsed} / ${e.tokenBudget}`,n=[`Goal: ${e.objective}`,`Status: ${h(e.status)}`,`Time: ${c(e)}`,`Tokens: ${t}`,`Continuation turns: ${e.turnsExecuted}`];return e.status===`max_turns`&&n.push("Hint: Max continuation turns reached (150). Run `/goal continue` to reset and continue."),n.join(`
3
3
  `)}function j(e){return p(e),f(),l(),`Goal set.`}async function M(e,t,n){let r=n.trim();if(!r||r.toLowerCase()===`status`)return e(A(),{display:`system`}),null;let i=r.toLowerCase();if(i===`clear`){let t=m();return t&&(y(),k()),e(t?`Goal cleared.`:`No active goal to clear.`,{display:`system`}),null}if(i===`pause`){let t=u();return t&&(l(),k()),e(t?`Goal paused.`:`No active goal to pause.`,{display:`system`}),null}if(i===`resume`){if(v()?.status===`max_turns`)return e("Goal reached max continuation turns (150). Run `/goal continue` to reset turn counter and continue.",{display:`system`}),null;let t=g();return t&&l(),e(t?`Goal resumed.`:`No paused goal to resume.`,{display:`system`,shouldQuery:!!t}),null}if(i===`continue`){let t=d();return t&&l(),e(t?`Goal continuation counter reset (0/150). Continuing...`:`Current goal is not in max-turns state.`,{display:`system`,shouldQuery:!!t}),null}if(i===`complete`){let t=_();return t&&(l(),k()),e(t?`Goal marked complete.`:`No active goal to complete.`,{display:`system`}),null}if(r.length>P)return e(`Goal objective is too long (${r.length} chars; limit ${P}). Save the detailed instructions to a file and reference it from a shorter objective.`,{display:`system`}),null;let a=v();return a&&a.status!==`complete`?(0,N.jsx)(T,{currentGoal:a,newObjective:r,onConfirm:()=>{k(),e(j(r),{display:`system`,shouldQuery:!0,displayArgs:O(r),metaMessages:[`<goal-objective-updated>\n${r}\n</goal-objective-updated>`]})},onCancel:()=>{e(`Kept the current goal. New objective discarded.`,{display:`system`})}}):(e(j(r),{display:`system`,shouldQuery:!0,displayArgs:O(r),metaMessages:[`<goal-objective-updated>\n${r}\n</goal-objective-updated>`]}),null)}var N,P,F;e((()=>{b(),a(),o(),D(),N=i(),P=4e3,F=80}))();export{M as call};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{CS as t,ES as n,HS as r,Ji as i,Wx as a,bS as o,ca as s,dy as c,et as l,hy as u,rt as d,sy as f,ua as p,vy as m,wS as h,xS as g}from"./loadAgentsDir-DR5PVAc3.js";import{c as _,i as v}from"./debug-kBjDaVkQ.js";import{n as y,t as b}from"./client-Bw_L3lSc.js";import{n as x,t as S}from"./openaiShared-G2-w4gJt.js";import{randomUUID as C}from"crypto";async function*w(e,i,o,c,l){try{let a=r(l.model),m=p(e,o),v=(await Promise.all(o.map(e=>d(e,{getToolPermissionContext:l.getToolPermissionContext,tools:o,agents:l.agents,allowedAgentTypes:l.allowedAgentTypes,model:l.model})))).filter(e=>{let t=e;return t.type!==`advisor_20260301`&&t.type!==`computer_20250124`}),y=n(m,i),S=h(v),w=t(l.toolChoice),T=b({maxRetries:0,fetchOverride:l.fetchOverride,source:l.querySource});_(`[Grok] Calling model=${a}, messages=${y.length}, tools=${S.length}`);let E=g(await T.chat.completions.create({model:a,messages:y,...S.length>0&&{tools:S,...w&&{tool_choice:w}},stream:!0,stream_options:{include_usage:!0},...l.temperatureOverride!==void 0&&{temperature:l.temperatureOverride}},{signal:c}),a),D={},O=null,k={input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0},A=0,j=Date.now();for await(let e of E){switch(e.type){case`message_start`:O=e.message,A=Date.now()-j,e.message.usage&&(k=x(k,e.message.usage));break;case`content_block_start`:{let t=e.index,n=e.content_block;n.type===`tool_use`?D[t]={...n,input:``}:n.type===`text`?D[t]={...n,text:``}:n.type===`thinking`?D[t]={...n,thinking:``,signature:``}:D[t]={...n};break}case`content_block_delta`:{let t=e.index,n=e.delta,r=D[t];if(!r)break;n.type===`text_delta`?r.text=(r.text||``)+n.text:n.type===`input_json_delta`?r.input=(r.input||``)+n.partial_json:n.type===`thinking_delta`?r.thinking=(r.thinking||``)+n.thinking:n.type===`signature_delta`&&(r.signature=n.signature);break}case`content_block_stop`:{let t=D[e.index];if(!t||!O)break;yield{message:{...O,content:s([t],o,l.agentId)},requestId:void 0,type:`assistant`,uuid:C(),timestamp:new Date().toISOString()};break}case`message_delta`:{let t=e.usage;t&&(k=x(k,t));break}case`message_stop`:break}e.type===`message_stop`&&k.input_tokens+k.output_tokens>0&&f(u(a,k),k,l.model),yield{type:`stream_event`,event:e,...e.type===`message_start`?{ttftMs:A}:void 0}}}catch(e){let t=e instanceof Error?e.message:String(e);_(`[Grok] Error: ${t}`,{level:`error`}),yield a({content:`API Error: ${t}`,apiError:`api_error`,error:e instanceof Error?e:Error(String(e))})}}e((()=>{y(),S(),o(),i(),l(),v(),c(),m()}))();export{w as queryModelGrok};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{CS as t,ES as n,HS as r,Ji as i,Wx as a,bS as o,ca as s,dy as c,et as l,hy as u,rt as d,sy as f,ua as p,vy as m,wS as h,xS as g}from"./loadAgentsDir-bmpKLPdG.js";import{c as _,i as v}from"./debug-2pVES-2G.js";import{n as y,t as b}from"./client-pA7fKk0-.js";import{n as x,t as S}from"./openaiShared-G2-w4gJt.js";import{randomUUID as C}from"crypto";async function*w(e,i,o,c,l){try{let a=r(l.model),m=p(e,o),v=(await Promise.all(o.map(e=>d(e,{getToolPermissionContext:l.getToolPermissionContext,tools:o,agents:l.agents,allowedAgentTypes:l.allowedAgentTypes,model:l.model})))).filter(e=>{let t=e;return t.type!==`advisor_20260301`&&t.type!==`computer_20250124`}),y=n(m,i),S=h(v),w=t(l.toolChoice),T=b({maxRetries:0,fetchOverride:l.fetchOverride,source:l.querySource});_(`[Grok] Calling model=${a}, messages=${y.length}, tools=${S.length}`);let E=g(await T.chat.completions.create({model:a,messages:y,...S.length>0&&{tools:S,...w&&{tool_choice:w}},stream:!0,stream_options:{include_usage:!0},...l.temperatureOverride!==void 0&&{temperature:l.temperatureOverride}},{signal:c}),a),D={},O=null,k={input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0},A=0,j=Date.now();for await(let e of E){switch(e.type){case`message_start`:O=e.message,A=Date.now()-j,e.message.usage&&(k=x(k,e.message.usage));break;case`content_block_start`:{let t=e.index,n=e.content_block;n.type===`tool_use`?D[t]={...n,input:``}:n.type===`text`?D[t]={...n,text:``}:n.type===`thinking`?D[t]={...n,thinking:``,signature:``}:D[t]={...n};break}case`content_block_delta`:{let t=e.index,n=e.delta,r=D[t];if(!r)break;n.type===`text_delta`?r.text=(r.text||``)+n.text:n.type===`input_json_delta`?r.input=(r.input||``)+n.partial_json:n.type===`thinking_delta`?r.thinking=(r.thinking||``)+n.thinking:n.type===`signature_delta`&&(r.signature=n.signature);break}case`content_block_stop`:{let t=D[e.index];if(!t||!O)break;yield{message:{...O,content:s([t],o,l.agentId)},requestId:void 0,type:`assistant`,uuid:C(),timestamp:new Date().toISOString()};break}case`message_delta`:{let t=e.usage;t&&(k=x(k,t));break}case`message_stop`:break}e.type===`message_stop`&&k.input_tokens+k.output_tokens>0&&f(u(a,k),k,l.model),yield{type:`stream_event`,event:e,...e.type===`message_start`?{ttftMs:A}:void 0}}}catch(e){let t=e instanceof Error?e.message:String(e);_(`[Grok] Error: ${t}`,{level:`error`}),yield a({content:`API Error: ${t}`,apiError:`api_error`,error:e instanceof Error?e:Error(String(e))})}}e((()=>{y(),S(),o(),i(),l(),v(),c(),m()}))();export{w as queryModelGrok};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,Lt as r,P as i,Wt as a,a as o,ai as s,n as c,ot as l,r as u,t as d,x as f}from"./src-WZ94ZKI3.js";import{t as p}from"./jsx-runtime-Bb4Xn-E0.js";import{Mi as m,Ti as h,nb as g,rb as _,sb as v,tb as y,xi as b}from"./loadAgentsDir-DR5PVAc3.js";import{v as x,y as S}from"./startupProfiler-DIM_Ihyp.js";import{n as C,t as w}from"./useExitOnCtrlCDWithKeybindings-BgJrnuDl.js";import{n as T,t as E}from"./select-FrwoTzuc.js";import{n as D,r as O}from"./modalContext-CBE8xuck.js";import{n as k,t as A}from"./PromptInputHelpMenu-krq-hiFO.js";function j({commands:e,maxHeight:t,columns:r,title:a,onCancel:s,emptyMessage:c}){let{headerFocused:l,focusHeader:u}=o(),d=Math.max(1,r-10),f=Math.max(1,Math.floor((t-10)/2)),p=(0,M.useMemo)(()=>{let t=new Set;return e.filter(e=>t.has(e.name)?!1:(t.add(e.name),!0)).sort((e,t)=>e.name.localeCompare(t.name)).map(e=>({label:`/${e.name}`,value:e.name,description:S(h(e),d,!0)}))},[e,d]);return(0,N.jsx)(n,{flexDirection:`column`,paddingY:1,children:e.length===0&&c?(0,N.jsx)(i,{dimColor:!0,children:c}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(i,{children:a}),(0,N.jsx)(n,{marginTop:1,children:(0,N.jsx)(E,{options:p,visibleOptionCount:f,onCancel:s,disableSelection:!0,hideIndexes:!0,layout:`compact-vertical`,onUpFromFirstItem:u,isDisabled:l})})]})})}var M,N,P=e((()=>{M=t(s(),1),m(),x(),d(),T(),N=p()}));function F(){return(0,I.jsxs)(n,{flexDirection:`column`,paddingY:1,gap:1,children:[(0,I.jsxs)(n,{flexDirection:`column`,gap:1,children:[(0,I.jsx)(i,{bold:!0,children:`Getting started`}),(0,I.jsxs)(n,{flexDirection:`column`,children:[(0,I.jsxs)(i,{children:[(0,I.jsx)(i,{bold:!0,children:`1. `}),(0,I.jsx)(i,{children:`Ask a question or describe a task — Work Mate will explore your code and respond.`})]}),(0,I.jsxs)(i,{children:[(0,I.jsx)(i,{bold:!0,children:`2. `}),(0,I.jsx)(i,{children:`When Work Mate wants to edit files or run commands, you review and approve each action.`})]}),(0,I.jsxs)(i,{children:[(0,I.jsx)(i,{bold:!0,children:`3. `}),(0,I.jsx)(i,{children:`Type `}),(0,I.jsx)(i,{bold:!0,children:`/help`}),(0,I.jsx)(i,{children:` for commands, or `}),(0,I.jsx)(i,{bold:!0,children:`?`}),(0,I.jsx)(i,{children:` for shortcuts.`})]})]})]}),(0,I.jsxs)(n,{flexDirection:`column`,children:[(0,I.jsx)(n,{children:(0,I.jsx)(i,{bold:!0,children:`Shortcuts`})}),(0,I.jsx)(A,{gap:2,fixedWidth:!0})]})]})}var I,L=e((()=>{d(),k(),I=p()}));function R({onClose:e,commands:t}){let{rows:o,columns:s}=l(),d=Math.floor(o/2),p=O(),m=()=>e(`Help dialog dismissed`,{display:`system`});a(`help:dismiss`,m,{context:`Help`});let h=C(m),g=_(`help:dismiss`,`Help`,`esc`),v=b(),y=t.filter(e=>v.has(e.name)&&!e.isHidden),x=t.filter(e=>!v.has(e.name)&&!e.isHidden),S=[(0,z.jsx)(c,{title:`general`,children:(0,z.jsx)(F,{})},`general`)];return S.push((0,z.jsx)(c,{title:`commands`,children:(0,z.jsx)(j,{commands:y,maxHeight:d,columns:s,title:`Browse default commands:`,onCancel:m})},`commands`)),S.push((0,z.jsx)(c,{title:`custom-commands`,children:(0,z.jsx)(j,{commands:x,maxHeight:d,columns:s,title:`Browse custom commands:`,emptyMessage:`No custom commands found`,onCancel:m})},`custom`)),(0,z.jsx)(n,{flexDirection:`column`,height:p?void 0:d,children:(0,z.jsxs)(f,{color:`professionalBlue`,children:[(0,z.jsx)(u,{title:`Work Mate v0.0.26`,color:`professionalBlue`,defaultTab:`general`,children:S}),(0,z.jsx)(n,{marginTop:1,children:(0,z.jsxs)(i,{children:[`For more help: `,(0,z.jsx)(r,{url:`https://code.workmate.com/docs/en/overview`})]})}),(0,z.jsx)(n,{marginTop:1,children:(0,z.jsx)(i,{dimColor:!0,children:h.pending?(0,z.jsxs)(z.Fragment,{children:[`Press `,h.keyName,` again to exit`]}):(0,z.jsxs)(i,{italic:!0,children:[g,` to cancel`]})})})]})})}var z,B=e((()=>{w(),g(),m(),D(),v(),d(),y(),P(),L(),z=p()})),V,H;e((()=>{B(),V=p(),H=async(e,{options:{commands:t}})=>(0,V.jsx)(R,{commands:t,onClose:e})}))();export{H as call};
1
+ import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,Lt as r,P as i,Wt as a,a as o,ai as s,n as c,ot as l,r as u,t as d,x as f}from"./src-BX54x08P.js";import{t as p}from"./jsx-runtime-Bb4Xn-E0.js";import{Mi as m,Ti as h,nb as g,rb as _,sb as v,tb as y,xi as b}from"./loadAgentsDir-bmpKLPdG.js";import{v as x,y as S}from"./startupProfiler-B9Qv2QGH.js";import{n as C,t as w}from"./useExitOnCtrlCDWithKeybindings-BT0nexZw.js";import{n as T,t as E}from"./select-CaxQ-BVq.js";import{n as D,r as O}from"./modalContext-sU2lfR08.js";import{n as k,t as A}from"./PromptInputHelpMenu-BZIVCV7V.js";function j({commands:e,maxHeight:t,columns:r,title:a,onCancel:s,emptyMessage:c}){let{headerFocused:l,focusHeader:u}=o(),d=Math.max(1,r-10),f=Math.max(1,Math.floor((t-10)/2)),p=(0,M.useMemo)(()=>{let t=new Set;return e.filter(e=>t.has(e.name)?!1:(t.add(e.name),!0)).sort((e,t)=>e.name.localeCompare(t.name)).map(e=>({label:`/${e.name}`,value:e.name,description:S(h(e),d,!0)}))},[e,d]);return(0,N.jsx)(n,{flexDirection:`column`,paddingY:1,children:e.length===0&&c?(0,N.jsx)(i,{dimColor:!0,children:c}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(i,{children:a}),(0,N.jsx)(n,{marginTop:1,children:(0,N.jsx)(E,{options:p,visibleOptionCount:f,onCancel:s,disableSelection:!0,hideIndexes:!0,layout:`compact-vertical`,onUpFromFirstItem:u,isDisabled:l})})]})})}var M,N,P=e((()=>{M=t(s(),1),m(),x(),d(),T(),N=p()}));function F(){return(0,I.jsxs)(n,{flexDirection:`column`,paddingY:1,gap:1,children:[(0,I.jsxs)(n,{flexDirection:`column`,gap:1,children:[(0,I.jsx)(i,{bold:!0,children:`Getting started`}),(0,I.jsxs)(n,{flexDirection:`column`,children:[(0,I.jsxs)(i,{children:[(0,I.jsx)(i,{bold:!0,children:`1. `}),(0,I.jsx)(i,{children:`Ask a question or describe a task — Work Mate will explore your code and respond.`})]}),(0,I.jsxs)(i,{children:[(0,I.jsx)(i,{bold:!0,children:`2. `}),(0,I.jsx)(i,{children:`When Work Mate wants to edit files or run commands, you review and approve each action.`})]}),(0,I.jsxs)(i,{children:[(0,I.jsx)(i,{bold:!0,children:`3. `}),(0,I.jsx)(i,{children:`Type `}),(0,I.jsx)(i,{bold:!0,children:`/help`}),(0,I.jsx)(i,{children:` for commands, or `}),(0,I.jsx)(i,{bold:!0,children:`?`}),(0,I.jsx)(i,{children:` for shortcuts.`})]})]})]}),(0,I.jsxs)(n,{flexDirection:`column`,children:[(0,I.jsx)(n,{children:(0,I.jsx)(i,{bold:!0,children:`Shortcuts`})}),(0,I.jsx)(A,{gap:2,fixedWidth:!0})]})]})}var I,L=e((()=>{d(),k(),I=p()}));function R({onClose:e,commands:t}){let{rows:o,columns:s}=l(),d=Math.floor(o/2),p=O(),m=()=>e(`Help dialog dismissed`,{display:`system`});a(`help:dismiss`,m,{context:`Help`});let h=C(m),g=_(`help:dismiss`,`Help`,`esc`),v=b(),y=t.filter(e=>v.has(e.name)&&!e.isHidden),x=t.filter(e=>!v.has(e.name)&&!e.isHidden),S=[(0,z.jsx)(c,{title:`general`,children:(0,z.jsx)(F,{})},`general`)];return S.push((0,z.jsx)(c,{title:`commands`,children:(0,z.jsx)(j,{commands:y,maxHeight:d,columns:s,title:`Browse default commands:`,onCancel:m})},`commands`)),S.push((0,z.jsx)(c,{title:`custom-commands`,children:(0,z.jsx)(j,{commands:x,maxHeight:d,columns:s,title:`Browse custom commands:`,emptyMessage:`No custom commands found`,onCancel:m})},`custom`)),(0,z.jsx)(n,{flexDirection:`column`,height:p?void 0:d,children:(0,z.jsxs)(f,{color:`professionalBlue`,children:[(0,z.jsx)(u,{title:`Work Mate v0.0.28`,color:`professionalBlue`,defaultTab:`general`,children:S}),(0,z.jsx)(n,{marginTop:1,children:(0,z.jsxs)(i,{children:[`For more help: `,(0,z.jsx)(r,{url:`https://code.workmate.com/docs/en/overview`})]})}),(0,z.jsx)(n,{marginTop:1,children:(0,z.jsx)(i,{dimColor:!0,children:h.pending?(0,z.jsxs)(z.Fragment,{children:[`Press `,h.keyName,` again to exit`]}):(0,z.jsxs)(i,{italic:!0,children:[g,` to cancel`]})})})]})})}var z,B=e((()=>{w(),g(),m(),D(),v(),d(),y(),P(),L(),z=p()})),V,H;e((()=>{B(),V=p(),H=async(e,{options:{commands:t}})=>(0,V.jsx)(R,{commands:t,onClose:e})}))();export{H as call};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,l as n,o as r}from"./envUtils-DZ_SvEVz.js";import{Pt as i,X as a,at as o}from"./state-CXY-q5gr.js";import{$ as s,C as c,I as l,N as u,S as d,c as f,et as p,f as m,h,i as g,x as _}from"./debug-kBjDaVkQ.js";import{n as v,r as y}from"./lockfile-D_9vif6E.js";import{n as b,t as x}from"./sleep-BbWr_FL1.js";import{a as S,i as C,n as w,r as T}from"./pasteStore-BmehVo5j.js";import{join as E}from"path";import{appendFile as D,writeFile as O}from"fs/promises";function k(e){return(e.match(/\r\n|\r|\n/g)||[]).length}function A(e,t){return t===0?`[Pasted text #${e}]`:`[Pasted text #${e} +${t} lines]`}function j(e){return`[Image #${e}]`}function M(e){return[...e.matchAll(/\[(Pasted text|Image|\.\.\.Truncated text) #(\d+)(?: \+\d+ lines)?(\.)*\]/g)].map(e=>({id:parseInt(e[2]||`0`,10),match:e[0],index:e.index})).filter(e=>e.id>0)}function N(e,t){let n=M(e),r=e;for(let e=n.length-1;e>=0;e--){let i=n[e],a=t[i.id];a?.type===`text`&&(r=r.slice(0,i.index)+a.content+r.slice(i.index+i.match.length))}return r}function P(e){return d(e)}async function*F(){let e=o();for(let e=q.length-1;e>=0;e--)yield q[e];let n=E(t(),`history.jsonl`);try{for await(let t of h(n))try{let n=P(t);if(n.sessionId===e&&Q.has(n.timestamp))continue;yield n}catch(e){f(`Failed to parse history line: ${e}`)}}catch(e){if(u(e)===`ENOENT`)return;throw e}}async function*I(){for await(let e of F())yield await z(e)}async function*L(){let e=a(),t=o(),n=[],r=0;for await(let i of F())if(!(!i||typeof i.project!=`string`)&&i.project===e&&(i.sessionId===t?(yield await z(i),r++):n.push(i),r+n.length>=G))break;for(let e of n){if(r>=G)return;yield await z(e),r++}}async function R(e){if(e.content)return{id:e.id,type:e.type,content:e.content,mediaType:e.mediaType,filename:e.filename};if(e.contentHash){let t=await C(e.contentHash);if(t)return{id:e.id,type:e.type,content:t,mediaType:e.mediaType,filename:e.filename}}return null}async function z(e){let t={};for(let[n,r]of Object.entries(e.pastedContents||{})){let e=await R(r);e&&(t[Number(n)]=e)}return{display:e.display,pastedContents:t}}async function B(){if(q.length===0)return;let e;try{let n=E(t(),`history.jsonl`);await O(n,``,{encoding:`utf8`,mode:384,flag:`a`}),e=await y(n,{stale:1e4,retries:{retries:3,minTimeout:50}});let r=q.map(e=>`${c(e)}\n`);q=[],await D(n,r.join(``),{mode:384})}catch(e){f(`Failed to write prompt history: ${e}`)}finally{e&&await e()}}async function V(e){if(!(J||q.length===0)&&!(e>5)){J=!0;try{await B()}finally{J=!1,q.length>0&&(await b(500),V(e+1))}}}async function H(e){let t=typeof e==`string`?{display:e,pastedContents:{}}:e,n={};if(t.pastedContents){for(let[e,r]of Object.entries(t.pastedContents))if(r.type!==`image`)if(r.content.length<=K)n[Number(e)]={id:r.id,type:r.type,content:r.content,mediaType:r.mediaType,filename:r.filename};else{let t=w(r.content);n[Number(e)]={id:r.id,type:r.type,contentHash:t,mediaType:r.mediaType,filename:r.filename},S(t,r.content)}}let r={...t,pastedContents:n,timestamp:Date.now(),project:a(),sessionId:o()};q.push(r),Z=r,Y=V(0)}function U(e){n(process.env.WORKMATE_SKIP_PROMPT_HISTORY)||(X||(X=!0,p(async()=>{Y&&await Y,q.length>0&&await B()})),H(e))}function W(){if(!Z)return;let e=Z;Z=null;let t=q.lastIndexOf(e);t===-1?Q.add(e.timestamp):q.splice(t,1)}var G,K,q,J,Y,X,Z,Q,$=e((()=>{i(),s(),g(),r(),l(),m(),v(),T(),x(),_(),G=100,K=1024,q=[],J=!1,Y=null,X=!1,Z=null,Q=new Set}));export{L as a,I as c,A as i,M as l,N as n,k as o,j as r,$ as s,U as t,W as u};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,l as n,o as r}from"./envUtils-QyzA_cFM.js";import{Pt as i,X as a,at as o}from"./state-CXY-q5gr.js";import{$ as s,C as c,I as l,N as u,S as d,c as f,et as p,f as m,h,i as g,x as _}from"./debug-2pVES-2G.js";import{n as v,r as y}from"./lockfile-D_9vif6E.js";import{n as b,t as x}from"./sleep-xKMbXTJe.js";import{a as S,i as C,n as w,r as T}from"./pasteStore-njJCBMKr.js";import{join as E}from"path";import{appendFile as D,writeFile as O}from"fs/promises";function k(e){return(e.match(/\r\n|\r|\n/g)||[]).length}function A(e,t){return t===0?`[Pasted text #${e}]`:`[Pasted text #${e} +${t} lines]`}function j(e){return`[Image #${e}]`}function M(e){return[...e.matchAll(/\[(Pasted text|Image|\.\.\.Truncated text) #(\d+)(?: \+\d+ lines)?(\.)*\]/g)].map(e=>({id:parseInt(e[2]||`0`,10),match:e[0],index:e.index})).filter(e=>e.id>0)}function N(e,t){let n=M(e),r=e;for(let e=n.length-1;e>=0;e--){let i=n[e],a=t[i.id];a?.type===`text`&&(r=r.slice(0,i.index)+a.content+r.slice(i.index+i.match.length))}return r}function P(e){return d(e)}async function*F(){let e=o();for(let e=q.length-1;e>=0;e--)yield q[e];let n=E(t(),`history.jsonl`);try{for await(let t of h(n))try{let n=P(t);if(n.sessionId===e&&Q.has(n.timestamp))continue;yield n}catch(e){f(`Failed to parse history line: ${e}`)}}catch(e){if(u(e)===`ENOENT`)return;throw e}}async function*I(){for await(let e of F())yield await z(e)}async function*L(){let e=a(),t=o(),n=[],r=0;for await(let i of F())if(!(!i||typeof i.project!=`string`)&&i.project===e&&(i.sessionId===t?(yield await z(i),r++):n.push(i),r+n.length>=G))break;for(let e of n){if(r>=G)return;yield await z(e),r++}}async function R(e){if(e.content)return{id:e.id,type:e.type,content:e.content,mediaType:e.mediaType,filename:e.filename};if(e.contentHash){let t=await C(e.contentHash);if(t)return{id:e.id,type:e.type,content:t,mediaType:e.mediaType,filename:e.filename}}return null}async function z(e){let t={};for(let[n,r]of Object.entries(e.pastedContents||{})){let e=await R(r);e&&(t[Number(n)]=e)}return{display:e.display,pastedContents:t}}async function B(){if(q.length===0)return;let e;try{let n=E(t(),`history.jsonl`);await O(n,``,{encoding:`utf8`,mode:384,flag:`a`}),e=await y(n,{stale:1e4,retries:{retries:3,minTimeout:50}});let r=q.map(e=>`${c(e)}\n`);q=[],await D(n,r.join(``),{mode:384})}catch(e){f(`Failed to write prompt history: ${e}`)}finally{e&&await e()}}async function V(e){if(!(J||q.length===0)&&!(e>5)){J=!0;try{await B()}finally{J=!1,q.length>0&&(await b(500),V(e+1))}}}async function H(e){let t=typeof e==`string`?{display:e,pastedContents:{}}:e,n={};if(t.pastedContents){for(let[e,r]of Object.entries(t.pastedContents))if(r.type!==`image`)if(r.content.length<=K)n[Number(e)]={id:r.id,type:r.type,content:r.content,mediaType:r.mediaType,filename:r.filename};else{let t=w(r.content);n[Number(e)]={id:r.id,type:r.type,contentHash:t,mediaType:r.mediaType,filename:r.filename},S(t,r.content)}}let r={...t,pastedContents:n,timestamp:Date.now(),project:a(),sessionId:o()};q.push(r),Z=r,Y=V(0)}function U(e){n(process.env.WORKMATE_SKIP_PROMPT_HISTORY)||(X||(X=!0,p(async()=>{Y&&await Y,q.length>0&&await B()})),H(e))}function W(){if(!Z)return;let e=Z;Z=null;let t=q.lastIndexOf(e);t===-1?Q.add(e.timestamp):q.splice(t,1)}var G,K,q,J,Y,X,Z,Q,$=e((()=>{i(),s(),g(),r(),l(),m(),v(),T(),x(),_(),G=100,K=1024,q=[],J=!1,Y=null,X=!1,Z=null,Q=new Set}));export{L as a,I as c,A as i,M as l,N as n,k as o,j as r,$ as s,U as t,W as u};
@@ -1,4 +1,4 @@
1
- import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./memoize-BK3gG5ob.js";import{n as i,t as a}from"./figures-5ThXQEtq.js";import{I as o,Lt as s,P as c,Wt as l,ai as u,t as d,y as f}from"./src-WZ94ZKI3.js";import{t as p}from"./jsx-runtime-Bb4Xn-E0.js";import{Pt as m,tt as h}from"./state-CXY-q5gr.js";import{Bh as ee,Cd as g,Dc as _,Dd as v,Ec as y,Ed as b,Gh as x,Kh as S,Sd as C,Td as w,Vh as te,tb as T,wd as E,xd as D,zh as O}from"./loadAgentsDir-DR5PVAc3.js";import{d as k,m as ne,s as A}from"./settings-YIDksG5Z.js";import{n as j}from"./analytics-COpjZpvd.js";import{l as M,o as N}from"./stringUtils-D_xPrwGQ.js";import{n as P,t as F}from"./select-FrwoTzuc.js";function re(e,t){let n={PreToolUse:{},PostToolUse:{},PostToolUseFailure:{},PermissionDenied:{},Notification:{},UserPromptSubmit:{},SessionStart:{},SessionEnd:{},Stop:{},StopFailure:{},SubagentStart:{},SubagentStop:{},PreCompact:{},PostCompact:{},PermissionRequest:{},Setup:{},TeammateIdle:{},TaskCreated:{},TaskCompleted:{},Elicitation:{},ElicitationResult:{},ConfigChange:{},WorktreeCreate:{},WorktreeRemove:{},InstructionsLoaded:{},CwdChanged:{},FileChanged:{}},r=L(t);D(e).forEach(e=>{let t=n[e.event];if(t){let n=r[e.event].matcherMetadata===void 0?``:e.matcher||``;t[n]||(t[n]=[]),t[n].push(e)}});let i=h();if(i)for(let[e,t]of Object.entries(i)){let r=e,i=n[r];if(i)for(let e of t??[]){let t=e.matcher||``;if(`pluginRoot`in e){i[t]??(i[t]=[]);for(let n of e.hooks)i[t].push({event:r,config:n,matcher:e.matcher,source:`pluginHook`,pluginName:e.pluginId})}}}return n}function ie(e,t){return v(Object.keys(e[t]||{}),e,t)}function ae(e,t,n){let r=n??``;return e[t]?.[r]??[]}function I(e,t){return L(t)[e].matcherMetadata}var L,R=e((()=>{r(),m(),b(),L=n(e=>({PreToolUse:{summary:`Before tool execution`,description:`Input to command is JSON of tool call arguments.
1
+ import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./memoize-BK3gG5ob.js";import{n as i,t as a}from"./figures-5ThXQEtq.js";import{I as o,Lt as s,P as c,Wt as l,ai as u,t as d,y as f}from"./src-BX54x08P.js";import{t as p}from"./jsx-runtime-Bb4Xn-E0.js";import{d as m,m as h,s as g}from"./settings-D4M13toi.js";import{Pt as _,tt as v}from"./state-CXY-q5gr.js";import{Bh as y,Cd as b,Dc as x,Dd as S,Ec as C,Ed as w,Gh as T,Kh as E,Sd as D,Td as O,Vh as k,tb as A,wd as j,xd as M,zh as ee}from"./loadAgentsDir-bmpKLPdG.js";import{n as te}from"./analytics-COpjZpvd.js";import{l as N,o as P}from"./stringUtils-Cs6E5f-B.js";import{n as F,t as I}from"./select-CaxQ-BVq.js";function ne(e,t){let n={PreToolUse:{},PostToolUse:{},PostToolUseFailure:{},PermissionDenied:{},Notification:{},UserPromptSubmit:{},SessionStart:{},SessionEnd:{},Stop:{},StopFailure:{},SubagentStart:{},SubagentStop:{},PreCompact:{},PostCompact:{},PermissionRequest:{},Setup:{},TeammateIdle:{},TaskCreated:{},TaskCompleted:{},Elicitation:{},ElicitationResult:{},ConfigChange:{},WorktreeCreate:{},WorktreeRemove:{},InstructionsLoaded:{},CwdChanged:{},FileChanged:{}},r=R(t);M(e).forEach(e=>{let t=n[e.event];if(t){let n=r[e.event].matcherMetadata===void 0?``:e.matcher||``;t[n]||(t[n]=[]),t[n].push(e)}});let i=v();if(i)for(let[e,t]of Object.entries(i)){let r=e,i=n[r];if(i)for(let e of t??[]){let t=e.matcher||``;if(`pluginRoot`in e){i[t]??(i[t]=[]);for(let n of e.hooks)i[t].push({event:r,config:n,matcher:e.matcher,source:`pluginHook`,pluginName:e.pluginId})}}}return n}function re(e,t){return S(Object.keys(e[t]||{}),e,t)}function ie(e,t,n){let r=n??``;return e[t]?.[r]??[]}function L(e,t){return R(t)[e].matcherMetadata}var R,ae=e((()=>{r(),_(),w(),R=n(e=>({PreToolUse:{summary:`Before tool execution`,description:`Input to command is JSON of tool call arguments.
2
2
  Exit code 0 - stdout/stderr not shown
3
3
  Exit code 2 - show stderr to model and block tool call
4
4
  Other exit codes - show stderr to user only but continue with tool call`,matcherMetadata:{fieldToMatch:`tool_name`,values:e}},PostToolUse:{summary:`After tool execution`,description:`Input to command is JSON with fields "inputs" (tool call arguments) and "response" (tool call response).
@@ -76,4 +76,4 @@ CLAUDE_ENV_FILE is set — write bash exports there to apply env to subsequent B
76
76
  The matcher field specifies filenames to watch in the current directory (e.g. ".envrc|.env").
77
77
  Hook output can include hookSpecificOutput.watchPaths (array of absolute paths) to dynamically update the watch list.
78
78
  Exit code 0 - command completes successfully
79
- Other exit codes - show stderr to user only`}}),e=>e.slice().sort().join(`,`))}));function z({hookEventMetadata:e,hooksByEvent:t,totalHooksCount:n,restrictedByPolicy:r,onSelectEvent:i,onCancel:l}){return(0,B.jsx)(f,{title:`Hooks`,subtitle:`${n} ${M(n,`hook`)} configured`,onCancel:l,children:(0,B.jsxs)(o,{flexDirection:`column`,gap:1,children:[r&&(0,B.jsxs)(o,{flexDirection:`column`,children:[(0,B.jsxs)(c,{color:`suggestion`,children:[a.info,` Hooks Restricted by Policy`]}),(0,B.jsx)(c,{dimColor:!0,children:`Only hooks from managed settings can run. User-defined hooks from ~/.workmate/settings.json, .workmate/settings.json, and .workmate/settings.local.json are blocked.`})]}),(0,B.jsx)(o,{flexDirection:`column`,children:(0,B.jsxs)(c,{dimColor:!0,children:[a.info,` This menu is read-only. To add or modify hooks, edit settings.json directly or ask Work Mate.`,` `,(0,B.jsx)(s,{url:`https://code.workmate.com/docs/en/hooks`,children:`Learn more`})]})}),(0,B.jsx)(o,{flexDirection:`column`,children:(0,B.jsx)(F,{onChange:e=>{i(e)},onCancel:l,options:Object.entries(e).map(([e,n])=>{let r=t[e]||0;return{label:r>0?(0,B.jsxs)(c,{children:[e,` `,(0,B.jsxs)(c,{color:`suggestion`,children:[`(`,r,`)`]})]}):e,value:e,description:n.summary}})})})]})})}var B,V=e((()=>{i(),d(),N(),P(),B=p()}));function H({selectedEvent:e,selectedMatcher:t,hooksForSelectedMatcher:n,hookEventMetadata:r,onSelect:i,onCancel:a}){let s=r.matcherMetadata===void 0?e:`${e} - Matcher: ${t||`(all)`}`;return n.length===0?(0,U.jsx)(f,{title:s,subtitle:r.description,onCancel:a,inputGuide:()=>(0,U.jsx)(c,{children:`Esc to go back`}),children:(0,U.jsxs)(o,{flexDirection:`column`,gap:1,children:[(0,U.jsx)(c,{dimColor:!0,children:`No hooks configured for this event.`}),(0,U.jsx)(c,{dimColor:!0,children:`To add hooks, edit settings.json directly or ask Work Mate.`})]})}):(0,U.jsx)(f,{title:s,subtitle:r.description,onCancel:a,children:(0,U.jsx)(o,{flexDirection:`column`,children:(0,U.jsx)(F,{options:n.map((e,t)=>({label:`[${e.config.type}] ${C(e.config)}`,value:t.toString(),description:e.source===`pluginHook`&&e.pluginName?`${E(e.source)} (${e.pluginName})`:E(e.source)})),onChange:e=>{let t=n[parseInt(e,10)];t&&i(t)},onCancel:a})})})}var U,W=e((()=>{d(),b(),P(),U=p()}));function G({selectedEvent:e,matchersForSelectedEvent:t,hooksByEventAndMatcher:n,eventDescription:r,onSelect:i,onCancel:a}){let s=K.useMemo(()=>t.map(t=>{let r=n[e]?.[t]||[];return{matcher:t,sources:Array.from(new Set(r.map(e=>e.source))),hookCount:r.length}}),[t,n,e]);return t.length===0?(0,q.jsx)(f,{title:`${e} - Matchers`,subtitle:r,onCancel:a,inputGuide:()=>(0,q.jsx)(c,{children:`Esc to go back`}),children:(0,q.jsxs)(o,{flexDirection:`column`,gap:1,children:[(0,q.jsx)(c,{dimColor:!0,children:`No hooks configured for this event.`}),(0,q.jsx)(c,{dimColor:!0,children:`To add hooks, edit settings.json directly or ask Work Mate.`})]})}):(0,q.jsx)(f,{title:`${e} - Matchers`,subtitle:r,onCancel:a,children:(0,q.jsx)(o,{flexDirection:`column`,children:(0,q.jsx)(F,{options:s.map(e=>({label:`[${e.sources.map(w).join(`, `)}] ${e.matcher||`(all)`}`,value:e.matcher,description:`${e.hookCount} ${M(e.hookCount,`hook`)}`})),onChange:e=>{i(e)},onCancel:a})})})}var K,q,oe=e((()=>{K=t(u(),1),d(),b(),N(),P(),q=p()}));function se({selectedHook:e,eventSupportsMatcher:t,onCancel:n}){return(0,J.jsx)(f,{title:`Hook details`,onCancel:n,inputGuide:()=>(0,J.jsx)(c,{children:`Esc to go back`}),children:(0,J.jsxs)(o,{flexDirection:`column`,gap:1,children:[(0,J.jsxs)(o,{flexDirection:`column`,children:[(0,J.jsxs)(c,{children:[`Event: `,(0,J.jsx)(c,{bold:!0,children:e.event})]}),t&&(0,J.jsxs)(c,{children:[`Matcher: `,(0,J.jsx)(c,{bold:!0,children:e.matcher||`(all)`})]}),(0,J.jsxs)(c,{children:[`Type: `,(0,J.jsx)(c,{bold:!0,children:e.config.type})]}),(0,J.jsxs)(c,{children:[`Source: `,(0,J.jsx)(c,{dimColor:!0,children:g(e.source)})]}),e.pluginName&&(0,J.jsxs)(c,{children:[`Plugin: `,(0,J.jsx)(c,{dimColor:!0,children:e.pluginName})]})]}),(0,J.jsxs)(o,{flexDirection:`column`,children:[(0,J.jsxs)(c,{dimColor:!0,children:[ce(e.config),`:`]}),(0,J.jsx)(o,{borderStyle:`round`,borderDimColor:!0,paddingLeft:1,paddingRight:1,children:(0,J.jsx)(c,{children:le(e.config)})})]}),`statusMessage`in e.config&&e.config.statusMessage&&(0,J.jsxs)(c,{children:[`Status message: `,(0,J.jsx)(c,{dimColor:!0,children:e.config.statusMessage})]}),(0,J.jsx)(c,{dimColor:!0,children:`To modify or remove this hook, edit settings.json directly or ask Work Mate to help.`})]})})}function ce(e){switch(e.type){case`command`:return`Command`;case`prompt`:return`Prompt`;case`agent`:return`Prompt`;case`http`:return`URL`}}function le(e){switch(e.type){case`command`:return e.command;case`prompt`:return e.prompt;case`agent`:return e.prompt;case`http`:return e.url}}var J,ue=e((()=>{d(),b(),J=p()}));function Y({toolNames:e,onExit:t}){let[n,r]=(0,X.useState)({mode:`select-event`}),[i,a]=(0,X.useState)(()=>k()?.disableAllHooks===!0&&A(`policySettings`)?.disableAllHooks===!0),[s,u]=(0,X.useState)(()=>A(`policySettings`)?.allowManagedHooksOnly===!0);S(e=>{if(e===`policySettings`){let e=k()?.disableAllHooks===!0;a(e&&A(`policySettings`)?.disableAllHooks===!0),u(A(`policySettings`)?.allowManagedHooksOnly===!0)}});let d=n.mode,p=`event`in n?n.event:`PreToolUse`,m=`matcher`in n?n.matcher:null,h=ee(e=>e.mcp),g=te(),_=(0,X.useMemo)(()=>[...e,...h.tools.map(e=>e.name)],[e,h.tools]),v=(0,X.useMemo)(()=>re(g.getState(),_),[_,g]),y=(0,X.useMemo)(()=>ie(v,p),[v,p]),b=(0,X.useMemo)(()=>ae(v,p,m),[v,p,m]),x=(0,X.useCallback)(()=>{t(`Hooks dialog dismissed`,{display:`system`})},[t]);l(`confirm:no`,x,{context:`Confirmation`,isActive:d===`select-event`}),l(`confirm:no`,()=>{r({mode:`select-event`})},{context:`Confirmation`,isActive:d===`select-matcher`}),l(`confirm:no`,()=>{`event`in n&&(I(n.event,_)===void 0?r({mode:`select-event`}):r({mode:`select-matcher`,event:n.event}))},{context:`Confirmation`,isActive:d===`select-hook`}),l(`confirm:no`,()=>{if(n.mode===`view-hook`){let{event:e,hook:t}=n;r({mode:`select-hook`,event:e,matcher:t.matcher||``})}},{context:`Confirmation`,isActive:d===`view-hook`});let C=L(_),w=k()?.disableAllHooks===!0,{hooksByEvent:T,totalHooksCount:E}=(0,X.useMemo)(()=>{let e={},t=0;for(let[n,r]of Object.entries(v)){let i=Object.values(r).reduce((e,t)=>e+t.length,0);e[n]=i,t+=i}return{hooksByEvent:e,totalHooksCount:t}},[v]);if(w)return(0,Z.jsx)(f,{title:`Hook Configuration - Disabled`,onCancel:x,inputGuide:()=>(0,Z.jsx)(c,{children:`Esc to close`}),children:(0,Z.jsxs)(o,{flexDirection:`column`,gap:1,children:[(0,Z.jsxs)(o,{flexDirection:`column`,children:[(0,Z.jsxs)(c,{children:[`All hooks are currently `,(0,Z.jsx)(c,{bold:!0,children:`disabled`}),i&&` by a managed settings file`,`. You have `,(0,Z.jsx)(c,{bold:!0,children:E}),` `,`configured `,M(E,`hook`),` that `,M(E,`is`,`are`),` not running.`]}),(0,Z.jsx)(o,{marginTop:1,children:(0,Z.jsx)(c,{dimColor:!0,children:`When hooks are disabled:`})}),(0,Z.jsx)(c,{dimColor:!0,children:`· No hook commands will execute`}),(0,Z.jsx)(c,{dimColor:!0,children:`· StatusLine will not be displayed`}),(0,Z.jsx)(c,{dimColor:!0,children:`· Tool operations will proceed without hook validation`})]}),!i&&(0,Z.jsx)(c,{dimColor:!0,children:`To re-enable hooks, remove "disableAllHooks" from settings.json or ask Work Mate.`})]})});switch(n.mode){case`select-event`:return(0,Z.jsx)(z,{hookEventMetadata:C,hooksByEvent:T,totalHooksCount:E,restrictedByPolicy:s,onSelectEvent:e=>{I(e,_)===void 0?r({mode:`select-hook`,event:e,matcher:``}):r({mode:`select-matcher`,event:e})},onCancel:x});case`select-matcher`:return(0,Z.jsx)(G,{selectedEvent:n.event,matchersForSelectedEvent:y,hooksByEventAndMatcher:v,eventDescription:C[n.event].description,onSelect:e=>{r({mode:`select-hook`,event:n.event,matcher:e})},onCancel:()=>{r({mode:`select-event`})}});case`select-hook`:return(0,Z.jsx)(H,{selectedEvent:n.event,selectedMatcher:n.matcher,hooksForSelectedMatcher:b,hookEventMetadata:C[n.event],onSelect:e=>{r({mode:`view-hook`,event:n.event,hook:e})},onCancel:()=>{I(n.event,_)===void 0?r({mode:`select-event`}):r({mode:`select-matcher`,event:n.event})}});case`view-hook`:return(0,Z.jsx)(se,{selectedHook:n.hook,eventSupportsMatcher:I(n.event,_)!==void 0,onCancel:()=>{let{event:e,hook:t}=n;r({mode:`select-hook`,event:e,matcher:t.matcher||``})}})}}var X,Z,de=e((()=>{X=t(u(),1),O(),x(),d(),T(),R(),ne(),N(),V(),W(),oe(),ue(),Z=p()})),Q,$;e((()=>{de(),j(),_(),Q=p(),$=async(e,t)=>{let n=t.getAppState().toolPermissionContext;return(0,Q.jsx)(Y,{toolNames:y(n).map(e=>e.name),onExit:e})}}))();export{$ as call};
79
+ Other exit codes - show stderr to user only`}}),e=>e.slice().sort().join(`,`))}));function z({hookEventMetadata:e,hooksByEvent:t,totalHooksCount:n,restrictedByPolicy:r,onSelectEvent:i,onCancel:l}){return(0,B.jsx)(f,{title:`Hooks`,subtitle:`${n} ${N(n,`hook`)} configured`,onCancel:l,children:(0,B.jsxs)(o,{flexDirection:`column`,gap:1,children:[r&&(0,B.jsxs)(o,{flexDirection:`column`,children:[(0,B.jsxs)(c,{color:`suggestion`,children:[a.info,` Hooks Restricted by Policy`]}),(0,B.jsx)(c,{dimColor:!0,children:`Only hooks from managed settings can run. User-defined hooks from ~/.workmate/settings.json, .workmate/settings.json, and .workmate/settings.local.json are blocked.`})]}),(0,B.jsx)(o,{flexDirection:`column`,children:(0,B.jsxs)(c,{dimColor:!0,children:[a.info,` This menu is read-only. To add or modify hooks, edit settings.json directly or ask Work Mate.`,` `,(0,B.jsx)(s,{url:`https://code.workmate.com/docs/en/hooks`,children:`Learn more`})]})}),(0,B.jsx)(o,{flexDirection:`column`,children:(0,B.jsx)(I,{onChange:e=>{i(e)},onCancel:l,options:Object.entries(e).map(([e,n])=>{let r=t[e]||0;return{label:r>0?(0,B.jsxs)(c,{children:[e,` `,(0,B.jsxs)(c,{color:`suggestion`,children:[`(`,r,`)`]})]}):e,value:e,description:n.summary}})})})]})})}var B,V=e((()=>{i(),d(),P(),F(),B=p()}));function H({selectedEvent:e,selectedMatcher:t,hooksForSelectedMatcher:n,hookEventMetadata:r,onSelect:i,onCancel:a}){let s=r.matcherMetadata===void 0?e:`${e} - Matcher: ${t||`(all)`}`;return n.length===0?(0,U.jsx)(f,{title:s,subtitle:r.description,onCancel:a,inputGuide:()=>(0,U.jsx)(c,{children:`Esc to go back`}),children:(0,U.jsxs)(o,{flexDirection:`column`,gap:1,children:[(0,U.jsx)(c,{dimColor:!0,children:`No hooks configured for this event.`}),(0,U.jsx)(c,{dimColor:!0,children:`To add hooks, edit settings.json directly or ask Work Mate.`})]})}):(0,U.jsx)(f,{title:s,subtitle:r.description,onCancel:a,children:(0,U.jsx)(o,{flexDirection:`column`,children:(0,U.jsx)(I,{options:n.map((e,t)=>({label:`[${e.config.type}] ${D(e.config)}`,value:t.toString(),description:e.source===`pluginHook`&&e.pluginName?`${j(e.source)} (${e.pluginName})`:j(e.source)})),onChange:e=>{let t=n[parseInt(e,10)];t&&i(t)},onCancel:a})})})}var U,W=e((()=>{d(),w(),F(),U=p()}));function G({selectedEvent:e,matchersForSelectedEvent:t,hooksByEventAndMatcher:n,eventDescription:r,onSelect:i,onCancel:a}){let s=K.useMemo(()=>t.map(t=>{let r=n[e]?.[t]||[];return{matcher:t,sources:Array.from(new Set(r.map(e=>e.source))),hookCount:r.length}}),[t,n,e]);return t.length===0?(0,q.jsx)(f,{title:`${e} - Matchers`,subtitle:r,onCancel:a,inputGuide:()=>(0,q.jsx)(c,{children:`Esc to go back`}),children:(0,q.jsxs)(o,{flexDirection:`column`,gap:1,children:[(0,q.jsx)(c,{dimColor:!0,children:`No hooks configured for this event.`}),(0,q.jsx)(c,{dimColor:!0,children:`To add hooks, edit settings.json directly or ask Work Mate.`})]})}):(0,q.jsx)(f,{title:`${e} - Matchers`,subtitle:r,onCancel:a,children:(0,q.jsx)(o,{flexDirection:`column`,children:(0,q.jsx)(I,{options:s.map(e=>({label:`[${e.sources.map(O).join(`, `)}] ${e.matcher||`(all)`}`,value:e.matcher,description:`${e.hookCount} ${N(e.hookCount,`hook`)}`})),onChange:e=>{i(e)},onCancel:a})})})}var K,q,oe=e((()=>{K=t(u(),1),d(),w(),P(),F(),q=p()}));function se({selectedHook:e,eventSupportsMatcher:t,onCancel:n}){return(0,J.jsx)(f,{title:`Hook details`,onCancel:n,inputGuide:()=>(0,J.jsx)(c,{children:`Esc to go back`}),children:(0,J.jsxs)(o,{flexDirection:`column`,gap:1,children:[(0,J.jsxs)(o,{flexDirection:`column`,children:[(0,J.jsxs)(c,{children:[`Event: `,(0,J.jsx)(c,{bold:!0,children:e.event})]}),t&&(0,J.jsxs)(c,{children:[`Matcher: `,(0,J.jsx)(c,{bold:!0,children:e.matcher||`(all)`})]}),(0,J.jsxs)(c,{children:[`Type: `,(0,J.jsx)(c,{bold:!0,children:e.config.type})]}),(0,J.jsxs)(c,{children:[`Source: `,(0,J.jsx)(c,{dimColor:!0,children:b(e.source)})]}),e.pluginName&&(0,J.jsxs)(c,{children:[`Plugin: `,(0,J.jsx)(c,{dimColor:!0,children:e.pluginName})]})]}),(0,J.jsxs)(o,{flexDirection:`column`,children:[(0,J.jsxs)(c,{dimColor:!0,children:[ce(e.config),`:`]}),(0,J.jsx)(o,{borderStyle:`round`,borderDimColor:!0,paddingLeft:1,paddingRight:1,children:(0,J.jsx)(c,{children:le(e.config)})})]}),`statusMessage`in e.config&&e.config.statusMessage&&(0,J.jsxs)(c,{children:[`Status message: `,(0,J.jsx)(c,{dimColor:!0,children:e.config.statusMessage})]}),(0,J.jsx)(c,{dimColor:!0,children:`To modify or remove this hook, edit settings.json directly or ask Work Mate to help.`})]})})}function ce(e){switch(e.type){case`command`:return`Command`;case`prompt`:return`Prompt`;case`agent`:return`Prompt`;case`http`:return`URL`}}function le(e){switch(e.type){case`command`:return e.command;case`prompt`:return e.prompt;case`agent`:return e.prompt;case`http`:return e.url}}var J,ue=e((()=>{d(),w(),J=p()}));function Y({toolNames:e,onExit:t}){let[n,r]=(0,X.useState)({mode:`select-event`}),[i,a]=(0,X.useState)(()=>m()?.disableAllHooks===!0&&g(`policySettings`)?.disableAllHooks===!0),[s,u]=(0,X.useState)(()=>g(`policySettings`)?.allowManagedHooksOnly===!0);E(e=>{if(e===`policySettings`){let e=m()?.disableAllHooks===!0;a(e&&g(`policySettings`)?.disableAllHooks===!0),u(g(`policySettings`)?.allowManagedHooksOnly===!0)}});let d=n.mode,p=`event`in n?n.event:`PreToolUse`,h=`matcher`in n?n.matcher:null,_=y(e=>e.mcp),v=k(),b=(0,X.useMemo)(()=>[...e,..._.tools.map(e=>e.name)],[e,_.tools]),x=(0,X.useMemo)(()=>ne(v.getState(),b),[b,v]),S=(0,X.useMemo)(()=>re(x,p),[x,p]),C=(0,X.useMemo)(()=>ie(x,p,h),[x,p,h]),w=(0,X.useCallback)(()=>{t(`Hooks dialog dismissed`,{display:`system`})},[t]);l(`confirm:no`,w,{context:`Confirmation`,isActive:d===`select-event`}),l(`confirm:no`,()=>{r({mode:`select-event`})},{context:`Confirmation`,isActive:d===`select-matcher`}),l(`confirm:no`,()=>{`event`in n&&(L(n.event,b)===void 0?r({mode:`select-event`}):r({mode:`select-matcher`,event:n.event}))},{context:`Confirmation`,isActive:d===`select-hook`}),l(`confirm:no`,()=>{if(n.mode===`view-hook`){let{event:e,hook:t}=n;r({mode:`select-hook`,event:e,matcher:t.matcher||``})}},{context:`Confirmation`,isActive:d===`view-hook`});let T=R(b),D=m()?.disableAllHooks===!0,{hooksByEvent:O,totalHooksCount:A}=(0,X.useMemo)(()=>{let e={},t=0;for(let[n,r]of Object.entries(x)){let i=Object.values(r).reduce((e,t)=>e+t.length,0);e[n]=i,t+=i}return{hooksByEvent:e,totalHooksCount:t}},[x]);if(D)return(0,Z.jsx)(f,{title:`Hook Configuration - Disabled`,onCancel:w,inputGuide:()=>(0,Z.jsx)(c,{children:`Esc to close`}),children:(0,Z.jsxs)(o,{flexDirection:`column`,gap:1,children:[(0,Z.jsxs)(o,{flexDirection:`column`,children:[(0,Z.jsxs)(c,{children:[`All hooks are currently `,(0,Z.jsx)(c,{bold:!0,children:`disabled`}),i&&` by a managed settings file`,`. You have `,(0,Z.jsx)(c,{bold:!0,children:A}),` `,`configured `,N(A,`hook`),` that `,N(A,`is`,`are`),` not running.`]}),(0,Z.jsx)(o,{marginTop:1,children:(0,Z.jsx)(c,{dimColor:!0,children:`When hooks are disabled:`})}),(0,Z.jsx)(c,{dimColor:!0,children:`· No hook commands will execute`}),(0,Z.jsx)(c,{dimColor:!0,children:`· StatusLine will not be displayed`}),(0,Z.jsx)(c,{dimColor:!0,children:`· Tool operations will proceed without hook validation`})]}),!i&&(0,Z.jsx)(c,{dimColor:!0,children:`To re-enable hooks, remove "disableAllHooks" from settings.json or ask Work Mate.`})]})});switch(n.mode){case`select-event`:return(0,Z.jsx)(z,{hookEventMetadata:T,hooksByEvent:O,totalHooksCount:A,restrictedByPolicy:s,onSelectEvent:e=>{L(e,b)===void 0?r({mode:`select-hook`,event:e,matcher:``}):r({mode:`select-matcher`,event:e})},onCancel:w});case`select-matcher`:return(0,Z.jsx)(G,{selectedEvent:n.event,matchersForSelectedEvent:S,hooksByEventAndMatcher:x,eventDescription:T[n.event].description,onSelect:e=>{r({mode:`select-hook`,event:n.event,matcher:e})},onCancel:()=>{r({mode:`select-event`})}});case`select-hook`:return(0,Z.jsx)(H,{selectedEvent:n.event,selectedMatcher:n.matcher,hooksForSelectedMatcher:C,hookEventMetadata:T[n.event],onSelect:e=>{r({mode:`view-hook`,event:n.event,hook:e})},onCancel:()=>{L(n.event,b)===void 0?r({mode:`select-event`}):r({mode:`select-matcher`,event:n.event})}});case`view-hook`:return(0,Z.jsx)(se,{selectedHook:n.hook,eventSupportsMatcher:L(n.event,b)!==void 0,onCancel:()=>{let{event:e,hook:t}=n;r({mode:`select-hook`,event:e,matcher:t.matcher||``})}})}}var X,Z,de=e((()=>{X=t(u(),1),ee(),T(),d(),A(),ae(),h(),P(),V(),W(),oe(),ue(),Z=p()})),Q,$;e((()=>{de(),te(),x(),Q=p(),$=async(e,t)=>{let n=t.getAppState().toolPermissionContext;return(0,Q.jsx)(Y,{toolNames:C(n).map(e=>e.name),onExit:e})}}))();export{$ as call};
@@ -0,0 +1 @@
1
+ import{mn as e,on as t,qt as n}from"./loadAgentsDir-bmpKLPdG.js";e();export{n as executeSessionEndHooks,t as getSessionEndHookTimeoutMs};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,P as n,ai as r,kn as i,s as a,t as o}from"./src-BX54x08P.js";import{t as s}from"./jsx-runtime-Bb4Xn-E0.js";import{Xt as c,m as l,qt as u,t as d,y as f}from"./settings-D4M13toi.js";import{I as p,M as m,c as h,i as g}from"./debug-2pVES-2G.js";import{n as _}from"./analytics-COpjZpvd.js";import{a as v,n as y,r as b,s as x,t as S}from"./nativeInstaller-DMkZdsof.js";import{join as C}from"node:path";import{homedir as w}from"node:os";var T=e(r(),1);_(),o(),g(),c(),p(),S(),l();var E=s();function D(){let e=u.platform===`win32`,t=w();return e?C(t,`.local`,`bin`,`claude.exe`).replace(/\//g,`\\`):`~/.local/bin/claude`}function O({messages:e}){return e.length===0?null:(0,E.jsxs)(t,{flexDirection:`column`,gap:0,marginBottom:1,children:[(0,E.jsx)(t,{children:(0,E.jsxs)(n,{color:`warning`,children:[(0,E.jsx)(a,{status:`warning`,withSpace:!0}),`Setup notes:`]})}),e.map((e,r)=>(0,E.jsx)(t,{marginLeft:2,children:(0,E.jsxs)(n,{dimColor:!0,children:[`• `,e]})},r))]})}function k({onDone:e,force:r,target:i}){let[o,s]=(0,T.useState)({type:`checking`});return(0,T.useEffect)(()=>{async function e(){try{h(`Install: Starting installation process (force=${r}, target=${i})`);let e=i||d()?.autoUpdatesChannel||`latest`;s({type:`installing`,version:e}),h(`Install: Calling installLatest(channelOrVersion=${e}, forceReinstall=${r})`);let t=await x(e,r);if(h(`Install: installLatest returned version=${t.latestVersion}, wasUpdated=${t.wasUpdated}, lockFailed=${t.lockFailed}`),t.lockFailed)throw Error(`Could not install - another process is currently installing Work Mate. Please try again in a moment.`);t.latestVersion||h(`Install: Failed to retrieve version information during install`,{level:`error`}),t.wasUpdated||h(`Install: Already up to date`),s({type:`setting-up`});let n=await y(!0);h(`Install: Setup launcher completed with ${n.length} messages`),n.length>0&&n.forEach(e=>h(`Install: Setup message: ${e.message}`)),h(`Install: Cleaning up npm installations after successful install`);let{removed:a,errors:o,warnings:c}=await b();a>0&&h(`Cleaned up ${a} npm installation(s)`),o.length>0&&h(`Cleanup errors: ${o.join(`, `)}`);let l=await v();l.length>0&&h(`Shell alias cleanup: ${l.map(e=>e.message).join(`; `)}`),+!!t.latestVersion,(i===`latest`||i===`stable`)&&(f(`userSettings`,{autoUpdatesChannel:i}),h(`Install: Saved autoUpdatesChannel=${i} to user settings`));let u=[...c,...l.map(e=>e.message)];n.length>0?(s({type:`set-up`,messages:n.map(e=>e.message)}),setTimeout(s,2e3,{type:`success`,version:t.latestVersion||`current`,setupMessages:[...n.map(e=>e.message),...u]})):(h(`Install: Shell PATH already configured`),s({type:`success`,version:t.latestVersion||`current`,setupMessages:u.length>0?u:void 0}))}catch(e){h(`Install command failed: ${e}`,{level:`error`}),s({type:`error`,message:m(e)})}}e()},[r,i]),(0,T.useEffect)(()=>{o.type===`success`?setTimeout(e,2e3,`Work Mate installation completed successfully`,{display:`system`}):o.type===`error`&&setTimeout(e,3e3,`Work Mate installation failed`,{display:`system`})},[o,e]),(0,E.jsxs)(t,{flexDirection:`column`,marginTop:1,children:[o.type===`checking`&&(0,E.jsx)(n,{color:`claude`,children:`Checking installation status...`}),o.type===`cleaning-npm`&&(0,E.jsx)(n,{color:`warning`,children:`Cleaning up old npm installations...`}),o.type===`installing`&&(0,E.jsxs)(n,{color:`claude`,children:[`Installing Work Mate native build `,o.version,`...`]}),o.type===`setting-up`&&(0,E.jsx)(n,{color:`claude`,children:`Setting up launcher and shell integration...`}),o.type===`set-up`&&(0,E.jsx)(O,{messages:o.messages}),o.type===`success`&&(0,E.jsxs)(t,{flexDirection:`column`,gap:1,children:[(0,E.jsxs)(t,{children:[(0,E.jsx)(a,{status:`success`,withSpace:!0}),(0,E.jsx)(n,{color:`success`,bold:!0,children:`Work Mate successfully installed!`})]}),(0,E.jsxs)(t,{marginLeft:2,flexDirection:`column`,gap:1,children:[o.version!==`current`&&(0,E.jsxs)(t,{children:[(0,E.jsx)(n,{dimColor:!0,children:`Version: `}),(0,E.jsx)(n,{color:`claude`,children:o.version})]}),(0,E.jsxs)(t,{children:[(0,E.jsx)(n,{dimColor:!0,children:`Location: `}),(0,E.jsx)(n,{color:`text`,children:D()})]})]}),(0,E.jsx)(t,{marginLeft:2,flexDirection:`column`,gap:1,children:(0,E.jsxs)(t,{marginTop:1,children:[(0,E.jsx)(n,{dimColor:!0,children:`Next: Run `}),(0,E.jsx)(n,{color:`claude`,bold:!0,children:`claude --help`}),(0,E.jsx)(n,{dimColor:!0,children:` to get started`})]})}),o.setupMessages&&(0,E.jsx)(O,{messages:o.setupMessages})]}),o.type===`error`&&(0,E.jsxs)(t,{flexDirection:`column`,gap:1,children:[(0,E.jsxs)(t,{children:[(0,E.jsx)(a,{status:`error`,withSpace:!0}),(0,E.jsx)(n,{color:`error`,children:`Installation failed`})]}),(0,E.jsx)(n,{color:`error`,children:o.message}),(0,E.jsx)(t,{marginTop:1,children:(0,E.jsx)(n,{dimColor:!0,children:`Try running with --force to override checks`})})]})]})}var A={type:`local-jsx`,name:`install`,description:`安装 Work Mate 原生构建`,argumentHint:`[options]`,async call(e,t,n){let r=n.includes(`--force`),a=n.filter(e=>!e.startsWith(`--`))[0],{unmount:o}=await i((0,E.jsx)(k,{onDone:(t,n)=>{o(),e(t,n)},force:r,target:a}))}};export{A as install};