@readmagic/workmate 0.0.28 → 0.0.30

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 (305) hide show
  1. package/dist/chunks/{AddWorkspaceDirectory-Bmgh8VS3.js → AddWorkspaceDirectory-B03NZZuQ.js} +1 -1
  2. package/dist/chunks/AgentsMdExternalIncludesDialog-45Ize2zR.js +1 -0
  3. package/dist/chunks/{AgentsMdExternalIncludesDialog-BJfHqScU.js → AgentsMdExternalIncludesDialog-CIyefOzT.js} +1 -1
  4. package/dist/chunks/App-WBysAL0_.js +1 -0
  5. package/dist/chunks/{BackgroundTasksDialog-WkoL4g5Q.js → BackgroundTasksDialog-CvvrjBoq.js} +2 -2
  6. package/dist/chunks/{BypassPermissionsModeDialog-BT9yl0Qt.js → BypassPermissionsModeDialog-DdVbMyla.js} +1 -1
  7. package/dist/chunks/{CustomSelect-t4wXuXWH.js → CustomSelect-iSG1rbWU.js} +1 -1
  8. package/dist/chunks/{DiffDialog-CXZxnb7Y.js → DiffDialog-DSb46fzB.js} +5 -5
  9. package/dist/chunks/Doctor--yF3SBsD.js +1 -0
  10. package/dist/chunks/Doctor-dR71Dg_D.js +3 -0
  11. package/dist/chunks/ExitFlow-BiBi5Sqk.js +2 -0
  12. package/dist/chunks/{InvalidConfigDialog-riLYEaUP.js → InvalidConfigDialog-7MkDSXXj.js} +1 -1
  13. package/dist/chunks/{InvalidSettingsDialog-BGXl3V1A.js → InvalidSettingsDialog-D8Ves3Th.js} +1 -1
  14. package/dist/chunks/{KeybindingProviderSetup-syiDgtpB.js → KeybindingProviderSetup-DJSFdVYv.js} +1 -1
  15. package/dist/chunks/MCPConnectionManager-BZxRMdGO.js +1 -0
  16. package/dist/chunks/MCPToolListView-H_Kvvelz.js +1 -0
  17. package/dist/chunks/{McpParsingWarnings-Czze2JPd.js → McpParsingWarnings-D2xvaog9.js} +1 -1
  18. package/dist/chunks/MessageSelector-DQgIgPij.js +3 -0
  19. package/dist/chunks/Messages-DyQCr-od.js +10 -0
  20. package/dist/chunks/{Onboarding-CD_Uv5h9.js → Onboarding-DFufTPIY.js} +1 -1
  21. package/dist/chunks/{PromptInputFooterSuggestions-CHXJsTtQ.js → PromptInputFooterSuggestions-B9JRcHHE.js} +1 -1
  22. package/dist/chunks/{PromptInputHelpMenu-BZIVCV7V.js → PromptInputHelpMenu-DcGXK5lt.js} +1 -1
  23. package/dist/chunks/{ProviderSetup-CwMvjmjh.js → ProviderSetup-DJ_Z1BSe.js} +1 -1
  24. package/dist/chunks/QueryEngine-BQ5PSqKV.js +1 -0
  25. package/dist/chunks/{REPL-CtFtb35A.js → REPL-CjoJCy0g.js} +24 -24
  26. package/dist/chunks/REPL-DGieTVDl.js +1 -0
  27. package/dist/chunks/ResumeConversation-exTLviBY.js +1 -0
  28. package/dist/chunks/SearchExtraToolsTool-BBhWAuoA.js +1 -0
  29. package/dist/chunks/Settings-nM6-cXh0.js +2 -0
  30. package/dist/chunks/Spinner-ChT4lOOg.js +1 -0
  31. package/dist/chunks/{SpinnerGlyph-BR_SiV9L.js → SpinnerGlyph-4aVLQdJf.js} +1 -1
  32. package/dist/chunks/{TextInput-ou7ZhpVY.js → TextInput-CanSwT9J.js} +5 -5
  33. package/dist/chunks/{ThemePicker-CVFWqSc7.js → ThemePicker-CXzPiSy0.js} +1 -1
  34. package/dist/chunks/{TrustDialog-CGXv_LF4.js → TrustDialog-D0fJ-YIw.js} +1 -1
  35. package/dist/chunks/{ValidationErrorsList-CKeHoN2Z.js → ValidationErrorsList-29bQ0l-Q.js} +1 -1
  36. package/dist/chunks/{_baseEach-BYhqv77g.js → _baseEach-DPcnudh_.js} +1 -1
  37. package/dist/chunks/{add-dir-BSizpuef.js → add-dir-DbNz1SeY.js} +1 -1
  38. package/dist/chunks/{agentDisplay-JKfYFD1m.js → agentDisplay-Bif3eE1e.js} +1 -1
  39. package/dist/chunks/{agents-BDTCH6YB.js → agents-CbsNbPbp.js} +1 -1
  40. package/dist/chunks/{agents-MEaV8P2G.js → agents-yvC-VikU.js} +6 -6
  41. package/dist/chunks/allErrors-Bv1e8fra.js +1 -0
  42. package/dist/chunks/{appleTerminalBackup-CN8kS74J.js → appleTerminalBackup-Ct9hf1QQ.js} +1 -1
  43. package/dist/chunks/{backgroundHousekeeping-CsXlkIg3.js → backgroundHousekeeping-C75FgxW1.js} +1 -1
  44. package/dist/chunks/backgroundHousekeeping-d0qpqWHe.js +1 -0
  45. package/dist/chunks/banner-D5m9LUjl.js +2 -0
  46. package/dist/chunks/{branch-BllXcYwS.js → branch-DOQ3yNds.js} +2 -2
  47. package/dist/chunks/bridgeControl-DMUu37uO.js +2 -0
  48. package/dist/chunks/{btw-DzaRBa6o.js → btw-DUjuwyMH.js} +1 -1
  49. package/dist/chunks/{bundledMode-D9omqD3L.js → bundledMode-Dqe4pz0a.js} +1 -1
  50. package/dist/chunks/caches-BKAPMXp9.js +1 -0
  51. package/dist/chunks/caches-he4NeZSK.js +1 -0
  52. package/dist/chunks/channel-C8JmEI06.js +2 -0
  53. package/dist/chunks/{channel-Gw6skpUh.js → channel-TEYwDITo.js} +1 -1
  54. package/dist/chunks/{clear-CDQs9_5P.js → clear-BFlTcvMt.js} +1 -1
  55. package/dist/chunks/{client-pA7fKk0-.js → client-D3QmHVeI.js} +1 -1
  56. package/dist/chunks/client-dTKhXxBT.js +1 -0
  57. package/dist/chunks/{client-2w-g5kMx.js → client-q_uGYC2E.js} +1 -1
  58. package/dist/chunks/client-y_U1O4mI.js +1 -0
  59. package/dist/chunks/commands-BoGtXPAA.js +1 -0
  60. package/dist/chunks/compact-CyR7Sbo1.js +2 -0
  61. package/dist/chunks/config-B-hDBSL8.js +1 -0
  62. package/dist/chunks/config-Bjwat4P6.js +3 -0
  63. package/dist/chunks/config-DubkVeOw.js +1 -0
  64. package/dist/chunks/{context-TkdzCK3Y.js → context-Cm_gyngQ.js} +1 -1
  65. package/dist/chunks/{context-noninteractive-BcBo64vo.js → context-noninteractive-BDmFfPRt.js} +2 -2
  66. package/dist/chunks/context-noninteractive-CmOFpwwP.js +1 -0
  67. package/dist/chunks/conversation-B7YCvyCD.js +1 -0
  68. package/dist/chunks/conversation-CYZKYlWc.js +1 -0
  69. package/dist/chunks/{conversationRecovery-_hWC7JBO.js → conversationRecovery-BUqpxLl-.js} +1 -1
  70. package/dist/chunks/crossProjectResume-BCa2l0KZ.js +40 -0
  71. package/dist/chunks/{debug-2pVES-2G.js → debug-NBJH_NxR.js} +2 -2
  72. package/dist/chunks/{detectRepository--luIRv5H.js → detectRepository-Bu0he_XM.js} +1 -1
  73. package/dist/chunks/{diff-BzVUPO4Z.js → diff-BEvpLh_b.js} +1 -1
  74. package/dist/chunks/{directoryCompletion-BC0qRmrz.js → directoryCompletion-CwKPuwrS.js} +1 -1
  75. package/dist/chunks/doctor-DYKr9Reu.js +1 -0
  76. package/dist/chunks/{entry-333L52Lo.js → entry-JGyBs1p5.js} +3 -3
  77. package/dist/chunks/{execFileNoThrow-DXSEj8ZO.js → execFileNoThrow-7Ys9mO27.js} +1 -1
  78. package/dist/chunks/exit-DU2KGyDk.js +1 -0
  79. package/dist/chunks/{extraUsage-CmgRR-zH.js → extraUsage-cZx2XLx4.js} +1 -1
  80. package/dist/chunks/extractMemories-4wbv-mTc.js +1 -0
  81. package/dist/chunks/fast-BALHWqpd.js +1 -0
  82. package/dist/chunks/{fast-D7oNjaZ3.js → fast-DUJq6-QE.js} +1 -1
  83. package/dist/chunks/{fetchModelList-Cv1vWIpC.js → fetchModelList-Dn8OahtV.js} +1 -1
  84. package/dist/chunks/fetchModelList-OZ2sLDEx.js +1 -0
  85. package/dist/chunks/{fileSuggestions-DF3HTRKr.js → fileSuggestions-XLnnVLwx.js} +3 -3
  86. package/dist/chunks/{gemini-ou7_YyXc.js → gemini-qzPNGqOX.js} +2 -2
  87. package/dist/chunks/{generateSessionName-CeN9EZNY.js → generateSessionName-CA-cc58H.js} +1 -1
  88. package/dist/chunks/{genericProcessUtils-GqURdVAv.js → genericProcessUtils-XwqvFxyn.js} +1 -1
  89. package/dist/chunks/{goal-CCxo4Wyf.js → goal-x9Pkx5nv.js} +3 -3
  90. package/dist/chunks/{grok-BMmUcNbI.js → grok-36CpLjsq.js} +1 -1
  91. package/dist/chunks/{help-CYtogTZk.js → help-DwfAEV0X.js} +1 -1
  92. package/dist/chunks/{history-CUrqO9rV.js → history-PZLMYab7.js} +1 -1
  93. package/dist/chunks/hooks-BofA8GeO.js +1 -0
  94. package/dist/chunks/{hooks-ByVkvodY.js → hooks-DBmA-DWx.js} +2 -2
  95. package/dist/chunks/{install-DIxyfdXG.js → install-DF4ep6nb.js} +1 -1
  96. package/dist/chunks/{instrumentation-BmHivmxs.js → instrumentation-BAbhrE3f.js} +3 -3
  97. package/dist/chunks/{job-D534P26R.js → job-CFWKIjNl.js} +1 -1
  98. package/dist/chunks/{keybindings-CxgQqQJe.js → keybindings-CkiE_uBG.js} +1 -1
  99. package/dist/chunks/{launchLocalMemory-CWXLb3KF.js → launchLocalMemory-Cf8l-1fz.js} +2 -2
  100. package/dist/chunks/{launchOnboarding-CocPmwzz.js → launchOnboarding-8CDef-v1.js} +1 -1
  101. package/dist/chunks/loadAgentsDir-C-qRJlXH.js +1 -0
  102. package/dist/chunks/{loadAgentsDir-bmpKLPdG.js → loadAgentsDir-DnHL_5cU.js} +358 -358
  103. package/dist/chunks/loadPluginHooks-BuunKr9m.js +1 -0
  104. package/dist/chunks/{loader-BMAtuwRa.js → loader-DsEdsMHv.js} +1 -1
  105. package/dist/chunks/localSearch-BulDBrBk.js +1 -0
  106. package/dist/chunks/{localSearch-Da8cVYoI.js → localSearch-LFCzV7VE.js} +1 -1
  107. package/dist/chunks/{log-L1kqxa_P.js → log-D98mO6yJ.js} +1 -1
  108. package/dist/chunks/{logoUtils-qNuBc2nI.js → logoUtils-B8MIA7c5.js} +1 -1
  109. package/dist/chunks/{magicDocs-BsEiBLQl.js → magicDocs-BoxJusTI.js} +2 -2
  110. package/dist/chunks/{main-B31aPMPP.js → main-B9ciFYnO.js} +22 -22
  111. package/dist/chunks/{managedEnv-EZ2IirNa.js → managedEnv-B0mj-wgE.js} +1 -1
  112. package/dist/chunks/managedEnv-BFpXdDI8.js +1 -0
  113. package/dist/chunks/mcp-B3Ewo-_h.js +1 -0
  114. package/dist/chunks/mcp-CHlAZvpV.js +2 -0
  115. package/dist/chunks/{mcp-Dd8TBfQQ.js → mcp-DVKuOqvY.js} +3 -3
  116. package/dist/chunks/memory-Cr0d-s7U.js +1 -0
  117. package/dist/chunks/{mode-SM8doWgC.js → mode-DBNBDbVP.js} +2 -2
  118. package/dist/chunks/model-B2r1Ms0g.js +1 -0
  119. package/dist/chunks/model-C9ANf1-R.js +1 -0
  120. package/dist/chunks/{modelOptions-BQL4gbNk.js → modelOptions-B4BWYms0.js} +1 -1
  121. package/dist/chunks/{nativeInstaller-DMkZdsof.js → nativeInstaller-BDJxBAPV.js} +1 -1
  122. package/dist/chunks/{notifications-BwS1XsnZ.js → notifications-BV-VeXyJ.js} +1 -1
  123. package/dist/chunks/{onChangeAppState-C9cYQJPF.js → onChangeAppState-BGWWkhBg.js} +1 -1
  124. package/dist/chunks/openai-BL_IWBTr.js +2 -0
  125. package/dist/chunks/{overlayContext-C5WPACKC.js → overlayContext-DGUFuee9.js} +1 -1
  126. package/dist/chunks/{parser-CTnaXFVJ.js → parser-D2kggQDp.js} +1 -1
  127. package/dist/chunks/parser-DZUcp40d.js +1 -0
  128. package/dist/chunks/{partition-CKgWl7p4.js → partition-B2VCm4vu.js} +1 -1
  129. package/dist/chunks/{pasteStore-njJCBMKr.js → pasteStore-2RafnH7M.js} +1 -1
  130. package/dist/chunks/permissions-Bkj1UB1h.js +3 -0
  131. package/dist/chunks/{pidLock-CqkC3-nD.js → pidLock-CawSx6hb.js} +2 -2
  132. package/dist/chunks/{plan-Ce6wfjjI.js → plan-D7Ki5ADu.js} +1 -1
  133. package/dist/chunks/plugin-D7I6VZjh.js +17 -0
  134. package/dist/chunks/{pluginAutoupdate-ByokIVEs.js → pluginAutoupdate-Cr3jw-ky.js} +1 -1
  135. package/dist/chunks/pluginBlocklist-JG_kJSSK.js +1 -0
  136. package/dist/chunks/pluginCliCommands-BWIBBFJf.js +1 -0
  137. package/dist/chunks/{pluginFlagging-B2ZX5_oB.js → pluginFlagging-yFcXMVin.js} +1 -1
  138. package/dist/chunks/pluginOperations-6QXjdPOb.js +2 -0
  139. package/dist/chunks/pluginStartupCheck-B-nYb61N.js +1 -0
  140. package/dist/chunks/{pluginStartupCheck-QG0d95dE.js → pluginStartupCheck-CkjyJ4RS.js} +1 -1
  141. package/dist/chunks/plugins-CMDfjFp-.js +4 -0
  142. package/dist/chunks/{poorMode-CG2JNTD0.js → poorMode-BvypUTur.js} +1 -1
  143. package/dist/chunks/poorMode-CP6359Sz.js +1 -0
  144. package/dist/chunks/print-B6x_8O9w.js +13 -0
  145. package/dist/chunks/process-CewWh77C.js +1 -0
  146. package/dist/chunks/process-De2crvt4.js +1 -0
  147. package/dist/chunks/processBashCommand-D0BBcBHY.js +1 -0
  148. package/dist/chunks/processSlashCommand-BvjNuNyP.js +5 -0
  149. package/dist/chunks/{projectOnboardingState-D-_ijZnG.js → projectOnboardingState-ofkjp9FJ.js} +1 -1
  150. package/dist/chunks/prompt-Cpu4meqR.js +1 -0
  151. package/dist/chunks/{prompt-BnDapYGL.js → prompt-DDlkyIzV.js} +3 -3
  152. package/dist/chunks/prompt-HO8Docca.js +1 -0
  153. package/dist/chunks/{promptEditor-14TB3MYt.js → promptEditor-CyMqa_av.js} +1 -1
  154. package/dist/chunks/{protocolHandler-CJO3CRYW.js → protocolHandler-Bjmx7OmF.js} +1 -1
  155. package/dist/chunks/{proxy--_NfbJhm.js → proxy-MzIsnPd7.js} +1 -1
  156. package/dist/chunks/{reconciler-C_HKsocm.js → reconciler-CHbint0C.js} +1 -1
  157. package/dist/chunks/refresh-yut9uEfd.js +1 -0
  158. package/dist/chunks/{reject-Tug1RmkE.js → reject-CrNfit3M.js} +1 -1
  159. package/dist/chunks/{reload-plugins-CL9LWzpq.js → reload-plugins-labKy5Eh.js} +1 -1
  160. package/dist/chunks/rename-c8tElppw.js +1 -0
  161. package/dist/chunks/{renderOptions-B0RFpjRI.js → renderOptions-B3DyIbF6.js} +1 -1
  162. package/dist/chunks/{resume-BZ42SpS2.js → resume-C8xif2lo.js} +2 -2
  163. package/dist/chunks/ripgrep-CIIzTaSI.js +1 -0
  164. package/dist/chunks/{ripgrep-67m14ImZ.js → ripgrep-CnK9qx1e.js} +1 -1
  165. package/dist/chunks/{runtimeObserver-DT5P2_XL.js → runtimeObserver-DuJ8mRfr.js} +4 -4
  166. package/dist/chunks/{runtimeObserver-BLq2guVy.js → runtimeObserver-vmPplAGH.js} +1 -1
  167. package/dist/chunks/sandbox-adapter-BKnsdtVj.js +1 -0
  168. package/dist/chunks/{sandbox-toggle-DghmaJhK.js → sandbox-toggle-USHaZHD7.js} +1 -1
  169. package/dist/chunks/searchExtraTools-DV5iZPdw.js +1 -0
  170. package/dist/chunks/{select-CaxQ-BVq.js → select-BpiKdirZ.js} +1 -1
  171. package/dist/chunks/sessionFileAccessHooks-nq8C34WL.js +1 -0
  172. package/dist/chunks/sessionObserver-CKp3uqPg.js +1 -0
  173. package/dist/chunks/{sessionObserver-DBoZUvWL.js → sessionObserver-sO6PF7mV.js} +1 -1
  174. package/dist/chunks/sessionStorage-CuQf4d1y.js +1 -0
  175. package/dist/chunks/{sessionTracing-5a7HDF4e.js → sessionTracing-Bz89tYh5.js} +1 -1
  176. package/dist/chunks/settings-B3WqnPDo.js +1 -0
  177. package/dist/chunks/{settings-D4M13toi.js → settings-CA-5Px85.js} +2 -2
  178. package/dist/chunks/setup-B-FejaeH.js +3 -0
  179. package/dist/chunks/{shadowedRuleDetection-L3tnySui.js → shadowedRuleDetection-BI6Xz0pY.js} +1 -1
  180. package/dist/chunks/{sideQuestion-BJTVma-5.js → sideQuestion-BEpCuv_7.js} +3 -3
  181. package/dist/chunks/{sinks-CV0SWuZW.js → sinks-BvOPODnl.js} +1 -1
  182. package/dist/chunks/sinks-DLALCllz.js +1 -0
  183. package/dist/chunks/skillChangeDetector-D-fxaAMH.js +1 -0
  184. package/dist/chunks/{skillGapStore-Cposc03e.js → skillGapStore-A1FCr8Mf.js} +2 -2
  185. package/dist/chunks/{skillLifecycle-RXQp0JU7.js → skillLifecycle-CTVa34xO.js} +2 -2
  186. package/dist/chunks/{skillSearchPanel-B2pjskqk.js → skillSearchPanel-CjekGkrw.js} +4 -4
  187. package/dist/chunks/{skills-D2ZjMtv4.js → skills-110JHHbj.js} +1 -1
  188. package/dist/chunks/{sleep-xKMbXTJe.js → sleep-BGewNhNx.js} +1 -1
  189. package/dist/chunks/{startupProfiler-B9Qv2QGH.js → startupProfiler-C_xcIvEA.js} +1 -1
  190. package/dist/chunks/startupProfiler-uueg2S43.js +1 -0
  191. package/dist/chunks/status-D_b3UMke.js +1 -0
  192. package/dist/chunks/statusNoticeHelpers-C5BRU3lw.js +1 -0
  193. package/dist/chunks/{stringUtils-Cs6E5f-B.js → stringUtils-CtJhTszO.js} +1 -1
  194. package/dist/chunks/switcher-BFzvv7KT.js +1 -0
  195. package/dist/chunks/{switcher-rep86o4_.js → switcher-nLHGsxLw.js} +1 -1
  196. package/dist/chunks/{tasks-B4coTfrq.js → tasks-CjYr59Ak.js} +1 -1
  197. package/dist/chunks/{templateJobs-C5ukh6H3.js → templateJobs-ECX0rRRp.js} +1 -1
  198. package/dist/chunks/{terminalSetup-CaGbEVjB.js → terminalSetup-AptBNs_i.js} +1 -1
  199. package/dist/chunks/{terminalSetup-xe_P98fY.js → terminalSetup-CKO6eWhS.js} +1 -1
  200. package/dist/chunks/{theme-7RmvErYJ.js → theme-BCSx9irC.js} +1 -1
  201. package/dist/chunks/tipRegistry-CnQB3TaA.js +2 -0
  202. package/dist/chunks/{toolEventObserver-Dzwzi5Vi.js → toolEventObserver-Bqtypnkk.js} +1 -1
  203. package/dist/chunks/toolPool-B1sXN7SK.js +1 -0
  204. package/dist/chunks/{udsClient-CWeoNrm3.js → udsClient-COYqIvvr.js} +1 -1
  205. package/dist/chunks/{useExitOnCtrlCDWithKeybindings-BT0nexZw.js → useExitOnCtrlCDWithKeybindings-DegJrysj.js} +1 -1
  206. package/dist/chunks/useMainLoopModel-CPnigpM1.js +1 -0
  207. package/dist/chunks/useManagePlugins-BW2Zj_jf.js +1 -0
  208. package/dist/chunks/useMergedTools-CTm1AU9b.js +1 -0
  209. package/dist/chunks/{useSearchInput-j12K4wEo.js → useSearchInput-DrY4BZKy.js} +1 -1
  210. package/dist/chunks/useSettingsErrors-2uIAF6H8.js +1 -0
  211. package/dist/chunks/{util-CCEK8oze.js → util-BUgUtaUV.js} +1 -1
  212. package/dist/chunks/validatePlugin-BGB8T9Mb.js +1 -0
  213. package/dist/chunks/{vim-BlO9V5_5.js → vim-DdxGarvY.js} +1 -1
  214. package/dist/chunks/worktree-DBZ7f9Lk.js +1 -0
  215. package/dist/cli.js +1 -1
  216. package/package.json +1 -1
  217. package/dist/chunks/AgentsMdExternalIncludesDialog-BjbUilCE.js +0 -1
  218. package/dist/chunks/App-COdpsR2w.js +0 -1
  219. package/dist/chunks/Doctor-B6isid5K.js +0 -1
  220. package/dist/chunks/Doctor-COj-tZBc.js +0 -3
  221. package/dist/chunks/ExitFlow-CcMYH5iI.js +0 -2
  222. package/dist/chunks/MCPConnectionManager-C7RmKzJh.js +0 -1
  223. package/dist/chunks/MCPToolListView-CewNLJus.js +0 -1
  224. package/dist/chunks/MessageSelector-Kc6JlnDX.js +0 -3
  225. package/dist/chunks/Messages-BvFYO4Zn.js +0 -10
  226. package/dist/chunks/QueryEngine-DAwfp_ht.js +0 -1
  227. package/dist/chunks/REPL-tFT1FGQF.js +0 -1
  228. package/dist/chunks/ResumeConversation-CERzSBvg.js +0 -1
  229. package/dist/chunks/SearchExtraToolsTool-ndh4aEwQ.js +0 -1
  230. package/dist/chunks/Settings-CPaqWNdP.js +0 -2
  231. package/dist/chunks/Spinner-C0qHjfIY.js +0 -1
  232. package/dist/chunks/allErrors-Dhnf6rqg.js +0 -1
  233. package/dist/chunks/backgroundHousekeeping-Bu-zRFCx.js +0 -1
  234. package/dist/chunks/banner-BKOzHotb.js +0 -2
  235. package/dist/chunks/bridgeControl-aDnUrYZR.js +0 -2
  236. package/dist/chunks/caches-CMF-MmR-.js +0 -1
  237. package/dist/chunks/caches-CW5YnYNS.js +0 -1
  238. package/dist/chunks/channel-DVx21qde.js +0 -1
  239. package/dist/chunks/client-B0ngS4Uu.js +0 -1
  240. package/dist/chunks/client-BP4DOH3K.js +0 -1
  241. package/dist/chunks/commands-CfYMwgP7.js +0 -1
  242. package/dist/chunks/compact-6F2tuItE.js +0 -2
  243. package/dist/chunks/config-BDkzWBnL.js +0 -1
  244. package/dist/chunks/config-Bio2EjUK.js +0 -3
  245. package/dist/chunks/config-C_AEhZrn.js +0 -1
  246. package/dist/chunks/context-noninteractive-oFcnY1Er.js +0 -1
  247. package/dist/chunks/conversation-CYZyg1U1.js +0 -1
  248. package/dist/chunks/conversation-DXzlRhNw.js +0 -1
  249. package/dist/chunks/crossProjectResume-CCo3iZrB.js +0 -40
  250. package/dist/chunks/doctor-B4jQbGQr.js +0 -1
  251. package/dist/chunks/exit-D5DYnRvR.js +0 -1
  252. package/dist/chunks/extractMemories-CVUrBFMj.js +0 -1
  253. package/dist/chunks/fast-CRhW9zha.js +0 -1
  254. package/dist/chunks/fetchModelList-DIa1HwAJ.js +0 -1
  255. package/dist/chunks/hooks-CBGUcyCs.js +0 -1
  256. package/dist/chunks/loadAgentsDir-Zw648oQO.js +0 -1
  257. package/dist/chunks/loadPluginHooks-BIfM53-_.js +0 -1
  258. package/dist/chunks/localSearch-Dbj8cXyO.js +0 -1
  259. package/dist/chunks/managedEnv-DCGLDTP_.js +0 -1
  260. package/dist/chunks/mcp-BMeWtYCx.js +0 -2
  261. package/dist/chunks/mcp-CYbesbfl.js +0 -1
  262. package/dist/chunks/memory-DtQQGyPS.js +0 -1
  263. package/dist/chunks/model-C2r-PaR4.js +0 -1
  264. package/dist/chunks/model-Dd3x121y.js +0 -1
  265. package/dist/chunks/openai-Bea4I2Od.js +0 -2
  266. package/dist/chunks/parser-Diihup2V.js +0 -1
  267. package/dist/chunks/permissions-Dv_PCfY0.js +0 -3
  268. package/dist/chunks/plugin-aK4tDrVg.js +0 -17
  269. package/dist/chunks/pluginBlocklist-ByRQaVPu.js +0 -1
  270. package/dist/chunks/pluginCliCommands-Dyk4HYHs.js +0 -1
  271. package/dist/chunks/pluginOperations-BCvJvfOC.js +0 -2
  272. package/dist/chunks/pluginStartupCheck-o_TC7wIt.js +0 -1
  273. package/dist/chunks/plugins-DzsTDNWJ.js +0 -4
  274. package/dist/chunks/poorMode-eMIFCAC_.js +0 -1
  275. package/dist/chunks/print-dUT7E1g9.js +0 -13
  276. package/dist/chunks/process-CNfq37LF.js +0 -1
  277. package/dist/chunks/process-gEbdy6uY.js +0 -1
  278. package/dist/chunks/processBashCommand-DtGCgTkF.js +0 -1
  279. package/dist/chunks/processSlashCommand-wXblpK2C.js +0 -5
  280. package/dist/chunks/prompt-BdH2zk0S.js +0 -1
  281. package/dist/chunks/prompt-D0TFER0A.js +0 -1
  282. package/dist/chunks/refresh-Cm4jZzLa.js +0 -1
  283. package/dist/chunks/rename-OfKJSazJ.js +0 -1
  284. package/dist/chunks/ripgrep-DB7KB8RZ.js +0 -1
  285. package/dist/chunks/sandbox-adapter-982rx2cm.js +0 -1
  286. package/dist/chunks/searchExtraTools-B4N1bpy0.js +0 -1
  287. package/dist/chunks/sessionFileAccessHooks-BqQ58T7e.js +0 -1
  288. package/dist/chunks/sessionObserver-qYpA90El.js +0 -1
  289. package/dist/chunks/sessionStorage-CC0v4zMs.js +0 -1
  290. package/dist/chunks/settings-Dfit5gGT.js +0 -1
  291. package/dist/chunks/setup-DVLnIlse.js +0 -3
  292. package/dist/chunks/sinks-C9NdbjLo.js +0 -1
  293. package/dist/chunks/skillChangeDetector-DlodgOyC.js +0 -1
  294. package/dist/chunks/startupProfiler-DWcM4QBl.js +0 -1
  295. package/dist/chunks/status-BcSkj9nE.js +0 -1
  296. package/dist/chunks/statusNoticeHelpers-DsrqBOQt.js +0 -1
  297. package/dist/chunks/switcher-BietN6il.js +0 -1
  298. package/dist/chunks/tipRegistry-BYpJZIjR.js +0 -2
  299. package/dist/chunks/toolPool-BGfiNj6h.js +0 -1
  300. package/dist/chunks/useMainLoopModel-QuE7VkgX.js +0 -1
  301. package/dist/chunks/useManagePlugins-pGaGzsEg.js +0 -1
  302. package/dist/chunks/useMergedTools-BLsIT3R_.js +0 -1
  303. package/dist/chunks/useSettingsErrors-C8VIzdws.js +0 -1
  304. package/dist/chunks/validatePlugin-CTVnWx9H.js +0 -1
  305. package/dist/chunks/worktree-BWL0vR4o.js +0 -1
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./figures-5ThXQEtq.js";import{I as r,P as i,s as a,t as o}from"./src-BX54x08P.js";import{t as s}from"./jsx-runtime-Bb4Xn-E0.js";import{In as c,Nn as l,mn as u,pn as d}from"./settings-D4M13toi.js";import{A_ as f,B_ as p,Ji as m,O_ as h,Rx as g,V_ as _}from"./loadAgentsDir-bmpKLPdG.js";import{_ as v,g as y}from"./startupProfiler-B9Qv2QGH.js";import{At as b,Ot as x,Yt as S,in as C,rn as w,tn as T}from"./prompt-BnDapYGL.js";import{n as E,t as D}from"./staticRender-Bt82RvGc.js";function O(e){let t=[];return k(e,t),A(e,t),M(e,t),ee(e,t),N(e,t),t.sort((e,t)=>e.severity===t.severity?(t.savingsTokens??0)-(e.savingsTokens??0):e.severity===`warning`?-1:1),t}function k(e,t){e.percentage>=L&&t.push({severity:`warning`,title:`Context is ${e.percentage}% full`,detail:e.isAutoCompactEnabled?`Autocompact will trigger soon, which discards older messages. Use /compact now to control what gets kept.`:`Autocompact is disabled. Use /compact to free space, or enable autocompact in /config.`})}function A(e,t){if(e.messageBreakdown)for(let n of e.messageBreakdown.toolCallsByType){let r=n.callTokens+n.resultTokens,i=r/e.rawMaxTokens*100;if(i<P||r<F)continue;let a=j(n.name,r,i);a&&t.push(a)}}function j(e,t,n){let r=y(t);switch(e){case w:return{severity:`warning`,title:`Bash results using ${r} tokens (${n.toFixed(0)}%)`,detail:`Pipe output through head, tail, or grep to reduce result size. Avoid cat on large files — use Read with offset/limit instead.`,savingsTokens:Math.floor(t*.5)};case S:return{severity:`info`,title:`Read results using ${r} tokens (${n.toFixed(0)}%)`,detail:`Use offset and limit parameters to read only the sections you need. Avoid re-reading entire files when you only need a few lines.`,savingsTokens:Math.floor(t*.3)};case x:return{severity:`info`,title:`Grep results using ${r} tokens (${n.toFixed(0)}%)`,detail:`Add more specific patterns or use the glob or type parameter to narrow file types. Consider Glob for file discovery instead of Grep.`,savingsTokens:Math.floor(t*.3)};default:return n>=20?{severity:`info`,title:`${e} using ${r} tokens (${n.toFixed(0)}%)`,detail:`This tool is consuming a significant portion of context.`,savingsTokens:Math.floor(t*.2)}:null}}function M(e,t){if(!e.messageBreakdown)return;let n=e.messageBreakdown.toolCallsByType.find(e=>e.name===S);if(!n)return;let r=n.callTokens+n.resultTokens,i=r/e.rawMaxTokens*100,a=n.resultTokens/e.rawMaxTokens*100;i>=P&&r>=F||a>=I&&n.resultTokens>=F&&t.push({severity:`info`,title:`File reads using ${y(n.resultTokens)} tokens (${a.toFixed(0)}%)`,detail:`If you are re-reading files, consider referencing earlier reads. Use offset/limit for large files.`,savingsTokens:Math.floor(n.resultTokens*.3)})}function ee(e,t){let n=e.memoryFiles.reduce((e,t)=>e+t.tokens,0),r=n/e.rawMaxTokens*100;if(r>=R&&n>=z){let i=[...e.memoryFiles].sort((e,t)=>t.tokens-e.tokens).slice(0,3).map(e=>`${l(e.path)} (${y(e.tokens)})`).join(`, `);t.push({severity:`info`,title:`Memory files using ${y(n)} tokens (${r.toFixed(0)}%)`,detail:`Largest: ${i}. Use /memory to review and prune stale entries.`,savingsTokens:Math.floor(n*.3)})}}function N(e,t){!e.isAutoCompactEnabled&&e.percentage>=50&&e.percentage<L&&t.push({severity:`info`,title:`Autocompact is disabled`,detail:`Without autocompact, you will hit context limits and lose the conversation. Enable it in /config or use /compact manually.`})}var P,F,I,L,R,z,B=e((()=>{C(),T(),b(),c(),v(),P=15,F=1e4,I=5,L=80,R=5,z=5e3}));function V({suggestions:e}){return e.length===0?null:(0,H.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,H.jsx)(i,{bold:!0,children:`Suggestions`}),e.map((e,t)=>(0,H.jsxs)(r,{flexDirection:`column`,marginTop:t===0?0:1,children:[(0,H.jsxs)(r,{children:[(0,H.jsx)(a,{status:e.severity,withSpace:!0}),(0,H.jsx)(i,{bold:!0,children:e.title}),e.savingsTokens?(0,H.jsxs)(i,{dimColor:!0,children:[` `,n.arrowRight,` save ~`,y(e.savingsTokens)]}):null]}),(0,H.jsx)(r,{marginLeft:2,children:(0,H.jsx)(i,{dimColor:!0,children:e.detail})})]},t))]})}var H,U=e((()=>{t(),o(),v(),H=s()}));function W(){return null}function G(e){let t=new Map;for(let n of e){let e=d(n.source),r=t.get(e)||[];r.push(n),t.set(e,r)}for(let[e,n]of t.entries())t.set(e,n.sort((e,t)=>t.tokens-e.tokens));let n=new Map;for(let e of Y){let r=t.get(e);r&&n.set(e,r)}return n}function K({data:e}){let{categories:t,totalTokens:n,rawMaxTokens:a,percentage:o,gridRows:s,model:c,memoryFiles:u,mcpTools:d,deferredBuiltinTools:f=[],agents:p,skills:m,cacheHitRate:h,cacheThreshold:g}=e,_=t.filter(e=>e.tokens>0&&e.name!==`Free space`&&e.name!==J&&!e.isDeferred),v=t.some(e=>e.isDeferred&&e.name.includes(`MCP`)),b=t.find(e=>e.name===J);return(0,q.jsxs)(r,{flexDirection:`column`,paddingLeft:1,children:[(0,q.jsx)(i,{bold:!0,children:`Context Usage`}),(0,q.jsxs)(r,{flexDirection:`row`,gap:2,children:[(0,q.jsx)(r,{flexDirection:`column`,flexShrink:0,children:s.map((e,t)=>(0,q.jsx)(r,{flexDirection:`row`,marginLeft:-1,children:e.map((e,t)=>e.categoryName===`Free space`?(0,q.jsx)(i,{dimColor:!0,children:`⛶ `},t):e.categoryName===J?(0,q.jsx)(i,{color:e.color,children:`⛝ `},t):(0,q.jsx)(i,{color:e.color,children:e.squareFullness>=.7?`⛁ `:`⛀ `},t))},t))}),(0,q.jsxs)(r,{flexDirection:`column`,gap:0,flexShrink:0,children:[(0,q.jsxs)(i,{dimColor:!0,children:[c,` · `,y(n),`/`,y(a),` tokens (`,o,`%)`]}),(0,q.jsx)(W,{}),h!==void 0&&g!==void 0&&(0,q.jsxs)(i,{color:h<g?`warning`:void 0,children:[`Cache hit rate: `,h.toFixed(0),`%`,h<g?` (below ${g}% threshold)`:``]}),(0,q.jsx)(i,{children:` `}),(0,q.jsx)(i,{dimColor:!0,italic:!0,children:`Estimated usage by category`}),_.map((e,t)=>{let n=y(e.tokens),o=e.isDeferred?`N/A`:`${(e.tokens/a*100).toFixed(1)}%`,s=e.name===J,c=e.name,l=e.isDeferred?` `:s?`⛝`:`⛁`;return(0,q.jsxs)(r,{children:[(0,q.jsx)(i,{color:e.color,children:l}),(0,q.jsxs)(i,{children:[` `,c,`: `]}),(0,q.jsxs)(i,{dimColor:!0,children:[n,` tokens (`,o,`)`]})]},t)}),(t.find(e=>e.name===`Free space`)?.tokens??0)>0&&(0,q.jsxs)(r,{children:[(0,q.jsx)(i,{dimColor:!0,children:`⛶`}),(0,q.jsx)(i,{children:` Free space: `}),(0,q.jsxs)(i,{dimColor:!0,children:[y(t.find(e=>e.name===`Free space`)?.tokens||0),` (`,((t.find(e=>e.name===`Free space`)?.tokens||0)/a*100).toFixed(1),`%)`]})]}),b&&b.tokens>0&&(0,q.jsxs)(r,{children:[(0,q.jsx)(i,{color:b.color,children:`⛝`}),(0,q.jsxs)(i,{dimColor:!0,children:[` `,b.name,`: `]}),(0,q.jsxs)(i,{dimColor:!0,children:[y(b.tokens),` tokens (`,(b.tokens/a*100).toFixed(1),`%)`]})]})]})]}),(0,q.jsxs)(r,{flexDirection:`column`,marginLeft:-1,children:[d.length>0&&(0,q.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,q.jsxs)(r,{children:[(0,q.jsx)(i,{bold:!0,children:`MCP tools`}),(0,q.jsxs)(i,{dimColor:!0,children:[` · /mcp`,v?` (loaded on-demand)`:``]})]}),d.some(e=>e.isLoaded)&&(0,q.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,q.jsx)(i,{dimColor:!0,children:`Loaded`}),d.filter(e=>e.isLoaded).map((e,t)=>(0,q.jsxs)(r,{children:[(0,q.jsxs)(i,{children:[`└ `,e.name,`: `]}),(0,q.jsxs)(i,{dimColor:!0,children:[y(e.tokens),` tokens`]})]},t))]}),v&&d.some(e=>!e.isLoaded)&&(0,q.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,q.jsx)(i,{dimColor:!0,children:`Available`}),d.filter(e=>!e.isLoaded).map((e,t)=>(0,q.jsx)(r,{children:(0,q.jsxs)(i,{dimColor:!0,children:[`└ `,e.name]})},t))]}),!v&&d.map((e,t)=>(0,q.jsxs)(r,{children:[(0,q.jsxs)(i,{children:[`└ `,e.name,`: `]}),(0,q.jsxs)(i,{dimColor:!0,children:[y(e.tokens),` tokens`]})]},t))]}),p.length>0&&(0,q.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,q.jsxs)(r,{children:[(0,q.jsx)(i,{bold:!0,children:`Custom agents`}),(0,q.jsx)(i,{dimColor:!0,children:` · /agents`})]}),Array.from(G(p).entries()).map(([e,t])=>(0,q.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,q.jsx)(i,{dimColor:!0,children:e}),t.map((e,t)=>(0,q.jsxs)(r,{children:[(0,q.jsxs)(i,{children:[`└ `,e.agentType,`: `]}),(0,q.jsxs)(i,{dimColor:!0,children:[y(e.tokens),` tokens`]})]},t))]},e))]}),u.length>0&&(0,q.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,q.jsxs)(r,{children:[(0,q.jsx)(i,{bold:!0,children:`Memory files`}),(0,q.jsx)(i,{dimColor:!0,children:` · /memory`})]}),u.map((e,t)=>(0,q.jsxs)(r,{children:[(0,q.jsxs)(i,{children:[`└ `,l(e.path),`: `]}),(0,q.jsxs)(i,{dimColor:!0,children:[y(e.tokens),` tokens`]})]},t))]}),m&&m.tokens>0&&(0,q.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,q.jsxs)(r,{children:[(0,q.jsx)(i,{bold:!0,children:`Skills`}),(0,q.jsx)(i,{dimColor:!0,children:` · /skills`})]}),Array.from(G(m.skillFrontmatter).entries()).map(([e,t])=>(0,q.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,q.jsx)(i,{dimColor:!0,children:e}),t.map((e,t)=>(0,q.jsxs)(r,{children:[(0,q.jsxs)(i,{children:[`└ `,e.name,`: `]}),(0,q.jsxs)(i,{dimColor:!0,children:[y(e.tokens),` tokens`]})]},t))]},e))]})]}),(0,q.jsx)(V,{suggestions:O(e)})]})}var q,J,Y,X=e((()=>{o(),B(),c(),v(),u(),U(),q=s(),J=`Autocompact buffer`,Y=[`Project`,`User`,`Managed`,`Plugin`,`Built-in`]}));function Z(e){return g(e)}async function Q(e,t){let{messages:n,getAppState:r,options:{mainLoopModel:i,tools:a}}=t,o=Z(n),{messages:s}=await _(o),c=process.stdout.columns||80,l=r();return e(await E((0,$.jsx)(K,{data:await h(s,i,async()=>l.toolPermissionContext,a,l.agentDefinitions,c,t,void 0,o)}))),null}var $;e((()=>{X(),p(),f(),m(),D(),$=s()}))();export{Q as call};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./figures-5ThXQEtq.js";import{I as r,P as i,s as a,t as o}from"./src-BX54x08P.js";import{t as s}from"./jsx-runtime-Bb4Xn-E0.js";import{In as c,Nn as l,mn as u,pn as d}from"./settings-CA-5Px85.js";import{A_ as f,Bx as p,H_ as m,M_ as h,U_ as g,Xi as _}from"./loadAgentsDir-DnHL_5cU.js";import{_ as v,g as y}from"./startupProfiler-C_xcIvEA.js";import{At as b,Ot as x,Yt as S,in as C,rn as w,tn as T}from"./prompt-DDlkyIzV.js";import{n as E,t as D}from"./staticRender-Bt82RvGc.js";function O(e){let t=[];return k(e,t),A(e,t),M(e,t),ee(e,t),N(e,t),t.sort((e,t)=>e.severity===t.severity?(t.savingsTokens??0)-(e.savingsTokens??0):e.severity===`warning`?-1:1),t}function k(e,t){e.percentage>=L&&t.push({severity:`warning`,title:`Context is ${e.percentage}% full`,detail:e.isAutoCompactEnabled?`Autocompact will trigger soon, which discards older messages. Use /compact now to control what gets kept.`:`Autocompact is disabled. Use /compact to free space, or enable autocompact in /config.`})}function A(e,t){if(e.messageBreakdown)for(let n of e.messageBreakdown.toolCallsByType){let r=n.callTokens+n.resultTokens,i=r/e.rawMaxTokens*100;if(i<P||r<F)continue;let a=j(n.name,r,i);a&&t.push(a)}}function j(e,t,n){let r=y(t);switch(e){case w:return{severity:`warning`,title:`Bash results using ${r} tokens (${n.toFixed(0)}%)`,detail:`Pipe output through head, tail, or grep to reduce result size. Avoid cat on large files — use Read with offset/limit instead.`,savingsTokens:Math.floor(t*.5)};case S:return{severity:`info`,title:`Read results using ${r} tokens (${n.toFixed(0)}%)`,detail:`Use offset and limit parameters to read only the sections you need. Avoid re-reading entire files when you only need a few lines.`,savingsTokens:Math.floor(t*.3)};case x:return{severity:`info`,title:`Grep results using ${r} tokens (${n.toFixed(0)}%)`,detail:`Add more specific patterns or use the glob or type parameter to narrow file types. Consider Glob for file discovery instead of Grep.`,savingsTokens:Math.floor(t*.3)};default:return n>=20?{severity:`info`,title:`${e} using ${r} tokens (${n.toFixed(0)}%)`,detail:`This tool is consuming a significant portion of context.`,savingsTokens:Math.floor(t*.2)}:null}}function M(e,t){if(!e.messageBreakdown)return;let n=e.messageBreakdown.toolCallsByType.find(e=>e.name===S);if(!n)return;let r=n.callTokens+n.resultTokens,i=r/e.rawMaxTokens*100,a=n.resultTokens/e.rawMaxTokens*100;i>=P&&r>=F||a>=I&&n.resultTokens>=F&&t.push({severity:`info`,title:`File reads using ${y(n.resultTokens)} tokens (${a.toFixed(0)}%)`,detail:`If you are re-reading files, consider referencing earlier reads. Use offset/limit for large files.`,savingsTokens:Math.floor(n.resultTokens*.3)})}function ee(e,t){let n=e.memoryFiles.reduce((e,t)=>e+t.tokens,0),r=n/e.rawMaxTokens*100;if(r>=R&&n>=z){let i=[...e.memoryFiles].sort((e,t)=>t.tokens-e.tokens).slice(0,3).map(e=>`${l(e.path)} (${y(e.tokens)})`).join(`, `);t.push({severity:`info`,title:`Memory files using ${y(n)} tokens (${r.toFixed(0)}%)`,detail:`Largest: ${i}. Use /memory to review and prune stale entries.`,savingsTokens:Math.floor(n*.3)})}}function N(e,t){!e.isAutoCompactEnabled&&e.percentage>=50&&e.percentage<L&&t.push({severity:`info`,title:`Autocompact is disabled`,detail:`Without autocompact, you will hit context limits and lose the conversation. Enable it in /config or use /compact manually.`})}var P,F,I,L,R,z,B=e((()=>{C(),T(),b(),c(),v(),P=15,F=1e4,I=5,L=80,R=5,z=5e3}));function V({suggestions:e}){return e.length===0?null:(0,H.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,H.jsx)(i,{bold:!0,children:`Suggestions`}),e.map((e,t)=>(0,H.jsxs)(r,{flexDirection:`column`,marginTop:t===0?0:1,children:[(0,H.jsxs)(r,{children:[(0,H.jsx)(a,{status:e.severity,withSpace:!0}),(0,H.jsx)(i,{bold:!0,children:e.title}),e.savingsTokens?(0,H.jsxs)(i,{dimColor:!0,children:[` `,n.arrowRight,` save ~`,y(e.savingsTokens)]}):null]}),(0,H.jsx)(r,{marginLeft:2,children:(0,H.jsx)(i,{dimColor:!0,children:e.detail})})]},t))]})}var H,U=e((()=>{t(),o(),v(),H=s()}));function W(){return null}function G(e){let t=new Map;for(let n of e){let e=d(n.source),r=t.get(e)||[];r.push(n),t.set(e,r)}for(let[e,n]of t.entries())t.set(e,n.sort((e,t)=>t.tokens-e.tokens));let n=new Map;for(let e of Y){let r=t.get(e);r&&n.set(e,r)}return n}function K({data:e}){let{categories:t,totalTokens:n,rawMaxTokens:a,percentage:o,gridRows:s,model:c,memoryFiles:u,mcpTools:d,deferredBuiltinTools:f=[],agents:p,skills:m,cacheHitRate:h,cacheThreshold:g}=e,_=t.filter(e=>e.tokens>0&&e.name!==`Free space`&&e.name!==J&&!e.isDeferred),v=t.some(e=>e.isDeferred&&e.name.includes(`MCP`)),b=t.find(e=>e.name===J);return(0,q.jsxs)(r,{flexDirection:`column`,paddingLeft:1,children:[(0,q.jsx)(i,{bold:!0,children:`Context Usage`}),(0,q.jsxs)(r,{flexDirection:`row`,gap:2,children:[(0,q.jsx)(r,{flexDirection:`column`,flexShrink:0,children:s.map((e,t)=>(0,q.jsx)(r,{flexDirection:`row`,marginLeft:-1,children:e.map((e,t)=>e.categoryName===`Free space`?(0,q.jsx)(i,{dimColor:!0,children:`⛶ `},t):e.categoryName===J?(0,q.jsx)(i,{color:e.color,children:`⛝ `},t):(0,q.jsx)(i,{color:e.color,children:e.squareFullness>=.7?`⛁ `:`⛀ `},t))},t))}),(0,q.jsxs)(r,{flexDirection:`column`,gap:0,flexShrink:0,children:[(0,q.jsxs)(i,{dimColor:!0,children:[c,` · `,y(n),`/`,y(a),` tokens (`,o,`%)`]}),(0,q.jsx)(W,{}),h!==void 0&&g!==void 0&&(0,q.jsxs)(i,{color:h<g?`warning`:void 0,children:[`Cache hit rate: `,h.toFixed(0),`%`,h<g?` (below ${g}% threshold)`:``]}),(0,q.jsx)(i,{children:` `}),(0,q.jsx)(i,{dimColor:!0,italic:!0,children:`Estimated usage by category`}),_.map((e,t)=>{let n=y(e.tokens),o=e.isDeferred?`N/A`:`${(e.tokens/a*100).toFixed(1)}%`,s=e.name===J,c=e.name,l=e.isDeferred?` `:s?`⛝`:`⛁`;return(0,q.jsxs)(r,{children:[(0,q.jsx)(i,{color:e.color,children:l}),(0,q.jsxs)(i,{children:[` `,c,`: `]}),(0,q.jsxs)(i,{dimColor:!0,children:[n,` tokens (`,o,`)`]})]},t)}),(t.find(e=>e.name===`Free space`)?.tokens??0)>0&&(0,q.jsxs)(r,{children:[(0,q.jsx)(i,{dimColor:!0,children:`⛶`}),(0,q.jsx)(i,{children:` Free space: `}),(0,q.jsxs)(i,{dimColor:!0,children:[y(t.find(e=>e.name===`Free space`)?.tokens||0),` (`,((t.find(e=>e.name===`Free space`)?.tokens||0)/a*100).toFixed(1),`%)`]})]}),b&&b.tokens>0&&(0,q.jsxs)(r,{children:[(0,q.jsx)(i,{color:b.color,children:`⛝`}),(0,q.jsxs)(i,{dimColor:!0,children:[` `,b.name,`: `]}),(0,q.jsxs)(i,{dimColor:!0,children:[y(b.tokens),` tokens (`,(b.tokens/a*100).toFixed(1),`%)`]})]})]})]}),(0,q.jsxs)(r,{flexDirection:`column`,marginLeft:-1,children:[d.length>0&&(0,q.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,q.jsxs)(r,{children:[(0,q.jsx)(i,{bold:!0,children:`MCP tools`}),(0,q.jsxs)(i,{dimColor:!0,children:[` · /mcp`,v?` (loaded on-demand)`:``]})]}),d.some(e=>e.isLoaded)&&(0,q.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,q.jsx)(i,{dimColor:!0,children:`Loaded`}),d.filter(e=>e.isLoaded).map((e,t)=>(0,q.jsxs)(r,{children:[(0,q.jsxs)(i,{children:[`└ `,e.name,`: `]}),(0,q.jsxs)(i,{dimColor:!0,children:[y(e.tokens),` tokens`]})]},t))]}),v&&d.some(e=>!e.isLoaded)&&(0,q.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,q.jsx)(i,{dimColor:!0,children:`Available`}),d.filter(e=>!e.isLoaded).map((e,t)=>(0,q.jsx)(r,{children:(0,q.jsxs)(i,{dimColor:!0,children:[`└ `,e.name]})},t))]}),!v&&d.map((e,t)=>(0,q.jsxs)(r,{children:[(0,q.jsxs)(i,{children:[`└ `,e.name,`: `]}),(0,q.jsxs)(i,{dimColor:!0,children:[y(e.tokens),` tokens`]})]},t))]}),p.length>0&&(0,q.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,q.jsxs)(r,{children:[(0,q.jsx)(i,{bold:!0,children:`Custom agents`}),(0,q.jsx)(i,{dimColor:!0,children:` · /agents`})]}),Array.from(G(p).entries()).map(([e,t])=>(0,q.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,q.jsx)(i,{dimColor:!0,children:e}),t.map((e,t)=>(0,q.jsxs)(r,{children:[(0,q.jsxs)(i,{children:[`└ `,e.agentType,`: `]}),(0,q.jsxs)(i,{dimColor:!0,children:[y(e.tokens),` tokens`]})]},t))]},e))]}),u.length>0&&(0,q.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,q.jsxs)(r,{children:[(0,q.jsx)(i,{bold:!0,children:`Memory files`}),(0,q.jsx)(i,{dimColor:!0,children:` · /memory`})]}),u.map((e,t)=>(0,q.jsxs)(r,{children:[(0,q.jsxs)(i,{children:[`└ `,l(e.path),`: `]}),(0,q.jsxs)(i,{dimColor:!0,children:[y(e.tokens),` tokens`]})]},t))]}),m&&m.tokens>0&&(0,q.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,q.jsxs)(r,{children:[(0,q.jsx)(i,{bold:!0,children:`Skills`}),(0,q.jsx)(i,{dimColor:!0,children:` · /skills`})]}),Array.from(G(m.skillFrontmatter).entries()).map(([e,t])=>(0,q.jsxs)(r,{flexDirection:`column`,marginTop:1,children:[(0,q.jsx)(i,{dimColor:!0,children:e}),t.map((e,t)=>(0,q.jsxs)(r,{children:[(0,q.jsxs)(i,{children:[`└ `,e.name,`: `]}),(0,q.jsxs)(i,{dimColor:!0,children:[y(e.tokens),` tokens`]})]},t))]},e))]})]}),(0,q.jsx)(V,{suggestions:O(e)})]})}var q,J,Y,X=e((()=>{o(),B(),c(),v(),u(),U(),q=s(),J=`Autocompact buffer`,Y=[`Project`,`User`,`Managed`,`Plugin`,`Built-in`]}));function Z(e){return p(e)}async function Q(e,t){let{messages:n,getAppState:r,options:{mainLoopModel:i,tools:a}}=t,o=Z(n),{messages:s}=await g(o),c=process.stdout.columns||80,l=r();return e(await E((0,$.jsx)(K,{data:await f(s,i,async()=>l.toolPermissionContext,a,l.agentDefinitions,c,t,void 0,o)}))),null}var $;e((()=>{X(),m(),h(),_(),D(),$=s()}))();export{Q as call};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{mn as t,pn as n}from"./settings-D4M13toi.js";import{A_ as r,B_ as i,Ji as a,O_ as o,Rx as s,V_ as c}from"./loadAgentsDir-bmpKLPdG.js";import{_ as l,g as u}from"./startupProfiler-B9Qv2QGH.js";async function d(e){let{messages:t,getAppState:n,options:{mainLoopModel:r,tools:i,agentDefinitions:a,customSystemPrompt:l,appendSystemPrompt:u}}=e,d=s(t),{messages:f}=await c(d),p=n();return o(f,r,async()=>p.toolPermissionContext,i,a,void 0,{options:{customSystemPrompt:l,appendSystemPrompt:u}},void 0,d)}async function f(e,t){return{type:`text`,value:p(await d(t))}}function p(e){let{categories:t,totalTokens:r,rawMaxTokens:i,percentage:a,model:o,memoryFiles:s,mcpTools:c,agents:l,skills:d}=e,f=`## Context Usage
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{mn as t,pn as n}from"./settings-CA-5Px85.js";import{A_ as r,Bx as i,H_ as a,M_ as o,U_ as s,Xi as c}from"./loadAgentsDir-DnHL_5cU.js";import{_ as l,g as u}from"./startupProfiler-C_xcIvEA.js";async function d(e){let{messages:t,getAppState:n,options:{mainLoopModel:a,tools:o,agentDefinitions:c,customSystemPrompt:l,appendSystemPrompt:u}}=e,d=i(t),{messages:f}=await s(d),p=n();return r(f,a,async()=>p.toolPermissionContext,o,c,void 0,{options:{customSystemPrompt:l,appendSystemPrompt:u}},void 0,d)}async function f(e,t){return{type:`text`,value:p(await d(t))}}function p(e){let{categories:t,totalTokens:r,rawMaxTokens:i,percentage:a,model:o,memoryFiles:s,mcpTools:c,agents:l,skills:d}=e,f=`## Context Usage
2
2
 
3
3
  `;f+=`**Model:** ${o} \n`,f+=`**Tokens:** ${u(r)} / ${u(i)} (${a}%)\n`,f+=`
4
4
  `;let p=t.filter(e=>e.tokens>0&&e.name!==`Free space`&&e.name!==`Autocompact buffer`);if(p.length>0){f+=`### Estimated usage by category
@@ -26,4 +26,4 @@ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{mn as t,pn as n}from".
26
26
  `,f+=`| Skill | Source | Tokens |
27
27
  `,f+=`|-------|--------|--------|
28
28
  `;for(let e of d.skillFrontmatter)f+=`| ${e.name} | ${n(e.source)} | ${u(e.tokens)} |\n`;f+=`
29
- `}return f}var m=e((()=>{i(),r(),l(),a(),t()}));export{d as n,m as r,f as t};
29
+ `}return f}var m=e((()=>{a(),o(),l(),c(),t()}));export{d as n,m as r,f as t};
@@ -0,0 +1 @@
1
+ import{n as e,r as t,t as n}from"./context-noninteractive-BDmFfPRt.js";t();export{n as call,e as collectContextData};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./conversation-CYZKYlWc.js";e();export{t as clearConversation};
@@ -0,0 +1 @@
1
+ import{a as e,n as t}from"./rolldown-runtime-DaDcL9Zw.js";import{B as n,Pt as r,Ut as i,Vt as a,dn as o,pn as s,q as c,un as l}from"./state-CXY-q5gr.js";import{Cb as u,Dn as d,Eg as f,KC as p,Kn as m,On as h,Sb as g,Tn as _,Yt as v,ZC as y,Zr as b,cn as x,er as S,gn as C,gs as w,hh as T,hs as E,i_ as D,ph as O,r_ as k,rw as A,si as j,ui as M,uw as N,vg as P,vr as F,wg as I,wt as L,xt as R,yg as z}from"./loadAgentsDir-DnHL_5cU.js";import{o as B,s as V}from"./log-D98mO6yJ.js";import{n as H}from"./analytics-COpjZpvd.js";import{n as U,t as W}from"./caches-BKAPMXp9.js";import{randomUUID as G}from"crypto";async function K({setMessages:t,readFileState:r,discoveredSkillNames:f,loadedNestedMemoryPaths:h,getAppState:g,setAppState:C,setConversationId:T}){let E=x();await v(`clear`,{getAppState:g,setAppState:C,signal:AbortSignal.timeout(E),timeoutMs:E}),n();let k=new Set,N=[],P=e=>`isBackgrounded`in e&&e.isBackgrounded===!1;if(g)for(let e of Object.values(g().tasks))P(e)||w(e)&&(k.add(e.agentId),N.push(e));t(()=>[]);let{setContextBlocked:L}=(p(),e(y));L(!1),T&&T(G()),W(k),l(null),o(null),s(null),i(),u(c()),r.clear(),f?.clear(),h?.clear(),C&&C(e=>{let t={};for(let[n,r]of Object.entries(e.tasks)){if(!P(r)){t[n]=r;continue}try{r.status===`running`&&(z(r)&&(r.shellCommand?.kill(),r.shellCommand?.cleanup(),r.cleanupTimeoutId&&clearTimeout(r.cleanupTimeoutId)),`abortController`in r&&r.abortController?.abort(),`unregisterCleanup`in r&&r.unregisterCleanup?.())}catch(e){V(e)}_(n)}return{...e,tasks:t,attribution:O(),standaloneAgentContext:void 0,fileHistory:{snapshots:[],trackedFiles:new Set,snapshotSequence:0},mcp:{clients:[],tools:[],commands:[],resources:{},pluginReconnectKey:e.mcp.pluginReconnectKey}}}),A(),m(),a({setCurrentAsParent:!0}),await b();for(let e of N)e.status===`running`&&d(e.id,S(I(e.agentId)));let{saveMode:B}=(F(),e(M));B(`normal`);let H=R();H&&j(H);let U=await D(`clear`);U.length>0&&t(()=>U)}var q=t((()=>{r(),H(),E(),P(),f(),T(),C(),B(),N(),g(),k(),F(),h(),L(),U()}));export{q as n,K as t};
@@ -1 +1 @@
1
- import{Ht as e,Ut as t}from"./settings-D4M13toi.js";import{Pt as n,t as r}from"./state-CXY-q5gr.js";import{$x as i,Cg as a,Gr as o,Gx as s,Ji as c,Ln as l,Nr as u,Or as d,Zh as f,_a as p,ag as m,br as h,cS as g,cw as _,gr as v,is as y,kr as b,la as x,lr as S,n_ as C,nr as w,oa as T,rs as E,rw as D,t_ as O,ts as k,va as A,wa as j,wg as M,zn as N}from"./loadAgentsDir-bmpKLPdG.js";import{n as P,t as F}from"./cwd-DrEEb4f5.js";import{o as I,s as L}from"./log-L1kqxa_P.js";import{relative as R}from"path";P(),n(),M(),t(),k(),m(),I(),c(),_(),O(),v();function z(e){if(e.type!==`attachment`)return e;let t=e.attachment;if(t.type===`new_file`)return{...e,attachment:{...t,type:`file`,displayPath:R(F(),t.filename)}};if(t.type===`new_directory`)return{...e,attachment:{...t,type:`directory`,displayPath:R(F(),t.path)}};if(!(`displayPath`in t)){let n=`filename`in t?t.filename:`path`in t?t.path:`skillDir`in t?t.skillDir:void 0;if(n)return{...e,attachment:{...t,displayPath:R(F(),n)}}}return e}function B(e){return V(e).messages}function V(t){try{let n=t.map(z),r=new Set(e);for(let e of n)e.type===`user`&&e.permissionMode!==void 0&&!r.has(e.permissionMode)&&(e.permissionMode=void 0);let a=T(p(A(n))),o=H(a),c;if(o.kind===`interrupted_turn`){let[e]=x([i({content:`Continue from where you left off.`,isMeta:!0})]);a.push(e),c={kind:`interrupted_prompt`,message:e}}else c=o;let l=a.findLastIndex(e=>e.type!==`system`&&e.type!==`progress`);return l!==-1&&a[l].type===`user`&&a.splice(l+1,0,s({content:g})),{messages:a,turnInterruptionState:c}}catch(e){throw L(e),e}}function H(e){if(e.length===0)return{kind:`none`};let t=e.findLastIndex(e=>e.type!==`system`&&e.type!==`progress`&&!(e.type===`assistant`&&e.isApiErrorMessage)),n=t===-1?void 0:e[t];return!n||n.type===`assistant`?{kind:`none`}:n.type===`user`?n.isMeta||n.isCompactSummary?{kind:`none`}:j(n)?{kind:`interrupted_turn`}:{kind:`interrupted_prompt`,message:n}:n.type===`attachment`?{kind:`interrupted_turn`}:{kind:`none`}}function U(e){for(let t of e)if(t.type===`attachment`){if(t.attachment.type===`invoked_skills`){let e=t.attachment.skills;for(let t of e)t.name&&t.path&&t.content&&r(t.name,t.path,t.content,null)}t.attachment.type===`skill_listing`&&y()}y(),E()}async function W(e){let{messages:t,leafUuids:n}=await u(e),r=null,i=0;for(let e of t.values()){if(e.isSidechain||!n.has(e.uuid))continue;let t=new Date(e.timestamp).getTime();t>i&&(i=t,r=e)}return r?{messages:o(l(t,r)),sessionId:r.sessionId}:{messages:[],sessionId:void 0}}async function G(e,t){try{let n=null,r=null,i;if(e===void 0){let e=b(),t=new Set;try{let{listAllLiveSessions:e}=await import(`./udsClient-CWeoNrm3.js`),n=await e();t=new Set(n.flatMap(e=>e.kind&&e.kind!==`interactive`&&e.sessionId?[e.sessionId]:[]))}catch{}n=(await e).find(e=>{let n=S(e);return!n||!t.has(n)})??null}else if(t){let e=await W(t);r=e.messages,i=e.sessionId}else typeof e==`string`?(n=await w(e),i=e):n=e;if(!n&&!r)return null;n&&(h(n)&&(n=await d(n)),i||(i=S(n)),i&&await D(n,a(i)),f(n),r=n.messages,N(r)),U(r);let o=V(r);r=o.messages;let s=await C(`resume`,{sessionId:i});return r.push(...s),{messages:r,turnInterruptionState:o.turnInterruptionState,fileHistorySnapshots:n?.fileHistorySnapshots,attributionSnapshots:n?.attributionSnapshots,contentReplacements:n?.contentReplacements,contextCollapseCommits:n?.contextCollapseCommits,contextCollapseSnapshot:n?.contextCollapseSnapshot,sessionId:i,agentName:n?.agentName,agentColor:n?.agentColor,agentSetting:n?.agentSetting,customTitle:n?.customTitle,tag:n?.tag,mode:n?.mode,worktreeSession:n?.worktreeSession,prNumber:n?.prNumber,prUrl:n?.prUrl,prRepository:n?.prRepository,fullPath:n?.fullPath,goal:n?.goal}}catch(e){throw L(e),e}}export{G as n,B as t};
1
+ import{Ht as e,Ut as t}from"./settings-CA-5Px85.js";import{Pt as n,t as r}from"./state-CXY-q5gr.js";import{$h as i,Ar as a,Ea as o,Eg as s,Fr as c,Sr as l,Tg as u,Vn as d,Xi as f,as as p,aw as m,ba as h,ca as g,da as _,dr as v,i_ as y,ir as b,jr as x,os as S,qr as C,qx as w,r_ as T,rs as E,sg as D,tS as O,uS as k,uw as A,vr as j,ya as M,zn as N}from"./loadAgentsDir-DnHL_5cU.js";import{n as P,t as F}from"./cwd-DrEEb4f5.js";import{o as I,s as L}from"./log-D98mO6yJ.js";import{relative as R}from"path";P(),n(),s(),t(),E(),D(),I(),f(),A(),T(),j();function z(e){if(e.type!==`attachment`)return e;let t=e.attachment;if(t.type===`new_file`)return{...e,attachment:{...t,type:`file`,displayPath:R(F(),t.filename)}};if(t.type===`new_directory`)return{...e,attachment:{...t,type:`directory`,displayPath:R(F(),t.path)}};if(!(`displayPath`in t)){let n=`filename`in t?t.filename:`path`in t?t.path:`skillDir`in t?t.skillDir:void 0;if(n)return{...e,attachment:{...t,displayPath:R(F(),n)}}}return e}function B(e){return V(e).messages}function V(t){try{let n=t.map(z),r=new Set(e);for(let e of n)e.type===`user`&&e.permissionMode!==void 0&&!r.has(e.permissionMode)&&(e.permissionMode=void 0);let i=g(M(h(n))),a=H(i),o;if(a.kind===`interrupted_turn`){let[e]=_([O({content:`Continue from where you left off.`,isMeta:!0})]);i.push(e),o={kind:`interrupted_prompt`,message:e}}else o=a;let s=i.findLastIndex(e=>e.type!==`system`&&e.type!==`progress`);return s!==-1&&i[s].type===`user`&&i.splice(s+1,0,w({content:k})),{messages:i,turnInterruptionState:o}}catch(e){throw L(e),e}}function H(e){if(e.length===0)return{kind:`none`};let t=e.findLastIndex(e=>e.type!==`system`&&e.type!==`progress`&&!(e.type===`assistant`&&e.isApiErrorMessage)),n=t===-1?void 0:e[t];return!n||n.type===`assistant`?{kind:`none`}:n.type===`user`?n.isMeta||n.isCompactSummary?{kind:`none`}:o(n)?{kind:`interrupted_turn`}:{kind:`interrupted_prompt`,message:n}:n.type===`attachment`?{kind:`interrupted_turn`}:{kind:`none`}}function U(e){for(let t of e)if(t.type===`attachment`){if(t.attachment.type===`invoked_skills`){let e=t.attachment.skills;for(let t of e)t.name&&t.path&&t.content&&r(t.name,t.path,t.content,null)}t.attachment.type===`skill_listing`&&S()}S(),p()}async function W(e){let{messages:t,leafUuids:n}=await c(e),r=null,i=0;for(let e of t.values()){if(e.isSidechain||!n.has(e.uuid))continue;let t=new Date(e.timestamp).getTime();t>i&&(i=t,r=e)}return r?{messages:C(N(t,r)),sessionId:r.sessionId}:{messages:[],sessionId:void 0}}async function G(e,t){try{let n=null,r=null,o;if(e===void 0){let e=x(),t=new Set;try{let{listAllLiveSessions:e}=await import(`./udsClient-COYqIvvr.js`),n=await e();t=new Set(n.flatMap(e=>e.kind&&e.kind!==`interactive`&&e.sessionId?[e.sessionId]:[]))}catch{}n=(await e).find(e=>{let n=v(e);return!n||!t.has(n)})??null}else if(t){let e=await W(t);r=e.messages,o=e.sessionId}else typeof e==`string`?(n=await b(e),o=e):n=e;if(!n&&!r)return null;n&&(l(n)&&(n=await a(n)),o||(o=v(n)),o&&await m(n,u(o)),i(n),r=n.messages,d(r)),U(r);let s=V(r);r=s.messages;let c=await y(`resume`,{sessionId:o});return r.push(...c),{messages:r,turnInterruptionState:s.turnInterruptionState,fileHistorySnapshots:n?.fileHistorySnapshots,attributionSnapshots:n?.attributionSnapshots,contentReplacements:n?.contentReplacements,contextCollapseCommits:n?.contextCollapseCommits,contextCollapseSnapshot:n?.contextCollapseSnapshot,sessionId:o,agentName:n?.agentName,agentColor:n?.agentColor,agentSetting:n?.agentSetting,customTitle:n?.customTitle,tag:n?.tag,mode:n?.mode,worktreeSession:n?.worktreeSession,prNumber:n?.prNumber,prUrl:n?.prUrl,prRepository:n?.prRepository,fullPath:n?.fullPath,goal:n?.goal}}catch(e){throw L(e),e}}export{G as n,B as t};
@@ -0,0 +1,40 @@
1
+ import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{C as n,D as r,Gr as i,H as a,I as o,P as s,T as c,Wt as l,Xn as u,ai as d,di as f,fi as p,hn as m,k as ee,oi as te,ot as ne,p as h,t as g}from"./src-BX54x08P.js";import{t as _}from"./jsx-runtime-Bb4Xn-E0.js";import{$n as v,Jr as y,Qn as re,Vr as ie}from"./settings-CA-5Px85.js";import{Pt as b,at as ae,q as oe}from"./state-CXY-q5gr.js";import{Ar as x,Db as se,Dc as S,Eb as ce,Si as le,Sr as C,_d as w,bS as ue,br as de,dr as T,gd as E,kc as D,lb as fe,ni as pe,rb as O,rr as me,vr as he,xS as k,xi as ge}from"./loadAgentsDir-DnHL_5cU.js";import{S as _e,c as A,i as ve,x as j}from"./debug-NBJH_NxR.js";import{a as ye,o as be,s as xe}from"./log-D98mO6yJ.js";import{n as Se}from"./analytics-COpjZpvd.js";import{S as Ce,_ as we,d as Te,p as Ee}from"./startupProfiler-C_xcIvEA.js";import{f as De,u as Oe}from"./model-C9ANf1-R.js";import{n as ke,t as M}from"./useExitOnCtrlCDWithKeybindings-DegJrysj.js";import{n as N,t as Ae}from"./TextInput-CanSwT9J.js";import{n as je,t as Me}from"./select-BpiKdirZ.js";import{r as Ne,t as Pe}from"./Spinner-ChT4lOOg.js";import{l as Fe,u as Ie}from"./SpinnerGlyph-4aVLQdJf.js";import{t as Le}from"./SearchBox-zA5QwIpO.js";import{n as Re,t as ze}from"./useSearchInput-DrY4BZKy.js";import{n as P,t as F}from"./Messages-DyQCr-od.js";function Be({log:e,onExit:t,onSelect:n}){let[i,a]=I.useState(null);I.useEffect(()=>{a(null),C(e)&&x(e).then(a)},[e]);let u=C(e)&&i===null,d=i??e,f=T(d)||``,p=S();return l(`confirm:no`,t,{context:`Confirmation`}),l(`confirm:yes`,(0,I.useCallback)(()=>{n(i??e)},[n,i,e]),{context:`Confirmation`}),u?(0,L.jsxs)(o,{flexDirection:`column`,padding:1,children:[(0,L.jsx)(h,{message:`Loading session…`}),(0,L.jsx)(s,{dimColor:!0,children:(0,L.jsx)(c,{children:(0,L.jsx)(E,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})})})]}):(0,L.jsxs)(o,{flexDirection:`column`,children:[(0,L.jsx)(F,{messages:d.messages,tools:p,commands:[],verbose:!0,toolJSX:null,toolUseConfirmQueue:[],inProgressToolUseIDs:new Set,isMessageSelectorVisible:!1,conversationId:f,screen:`transcript`,streamingToolUses:[],showAllInTranscript:!0,isLoading:!1}),(0,L.jsxs)(o,{flexShrink:0,flexDirection:`column`,borderTopDimColor:!0,borderBottom:!1,borderLeft:!1,borderRight:!1,borderStyle:`single`,paddingLeft:2,children:[(0,L.jsxs)(s,{children:[Ee(d.modified),` · `,d.messageCount,` messages`,d.gitBranch?` · ${d.gitBranch}`:``]}),(0,L.jsx)(s,{dimColor:!0,children:(0,L.jsxs)(c,{children:[(0,L.jsx)(r,{shortcut:`Enter`,action:`resume`}),(0,L.jsx)(E,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]})]})}var I,L,Ve=e((()=>{I=t(d(),1),g(),O(),D(),we(),he(),w(),P(),L=_()}));function R(e,t){if(e===B)return 5;let n=i(e),r=t?Math.min(n,t-V-H):n;return Math.max(0,r)+V+H}function He(e,t){let n=t-V-H;return i(e)<=n?e:n<=1?e.charAt(0):Ce(e,n)}function Ue({tabs:e,selectedIndex:t,availableWidth:n,showAllProjects:r=!1}){let i=r?`Resume (All Projects)`:`Resume`,a=i.length+1,c=Math.max(Je,W),l=n-a-c-2,u=Math.max(0,Math.min(t,e.length-1)),d=Math.max(20,Math.floor(l/2)),f=e.map(e=>R(e,d)),p=0,m=e.length;if(f.reduce((e,t,n)=>e+t+ +(n<f.length-1),0)>l){let t=l-qe,n=f[u]??0;for(p=u,m=u+1;p>0||m<e.length;){let r=p>0,i=m<e.length;if(r){let e=(f[p-1]??0)+1;if(n+e<=t){p--,n+=e;continue}}if(i){let e=(f[m]??0)+1;if(n+e<=t){m++,n+=e;continue}}break}}let ee=p,te=e.length-m,ne=e.slice(p,m),h=ne.map((e,t)=>p+t);return(0,z.jsxs)(o,{flexDirection:`row`,gap:1,children:[(0,z.jsx)(s,{color:`suggestion`,children:i}),ee>0&&(0,z.jsxs)(s,{dimColor:!0,children:[U,ee]}),ne.map((e,t)=>{let n=h[t]===u,r=e===B?e:`#${He(e,d-V)}`;return(0,z.jsxs)(s,{backgroundColor:n?`suggestion`:void 0,color:n?`inverseText`:void 0,bold:n,children:[` `,r,` `]},e)}),te>0?(0,z.jsxs)(s,{dimColor:!0,children:[We,te,Ge]}):(0,z.jsx)(s,{dimColor:!0,children:Ke})]})}var z,B,V,H,U,We,Ge,Ke,qe,Je,W,G=e((()=>{g(),we(),z=_(),B=`All`,V=2,H=1,U=`← `,We=`→`,Ge=` (tab to cycle)`,Ke=`(tab to cycle)`,qe=5,Je=18,W=14}));function Ye({nodes:e,onSelect:t,onCancel:n,onFocus:r,focusNodeId:i,visibleOptionCount:a,layout:s=`expanded`,isDisabled:c=!1,hideIndexes:l=!1,isNodeExpanded:u,onExpand:d,onCollapse:f,getParentPrefix:p,getChildPrefix:m,onUpFromFirstItem:ee}){let[te,ne]=K.useState(new Set),h=K.useRef(!1),g=K.useRef(null),_=K.useCallback(e=>u?u(e):te.has(e),[u,te]),v=K.useMemo(()=>{let t=[];function n(e,r,i){let a=!!e.children&&e.children.length>0,o=_(e.id);if(t.push({node:e,depth:r,isExpanded:o,hasChildren:a,parentId:i}),a&&o&&e.children)for(let t of e.children)n(t,r+1,e.id)}for(let t of e)n(t,0);return t},[e,_]),y=K.useCallback(e=>e?`▼ `:`▶ `,[]),re=K.useCallback(e=>` ▸ `,[]),ie=p??y,b=m??re,ae=K.useCallback(e=>{let t=``;return e.hasChildren?t=ie(e.isExpanded):e.depth>0&&(t=b(e.depth)),t+e.node.label},[ie,b]),oe=K.useMemo(()=>v.map(e=>({label:ae(e),description:e.node.description,dimDescription:e.node.dimDescription??!0,value:e.node.id})),[v,ae]),x=K.useMemo(()=>{let e=new Map;return v.forEach(t=>e.set(t.node.id,t.node)),e},[v]),se=K.useCallback(e=>v.find(t=>t.node.id===e),[v]),S=K.useCallback((e,t)=>{se(e)?.hasChildren&&(t?d?d(e):ne(t=>new Set(t).add(e)):f?f(e):ne(t=>{let n=new Set(t);return n.delete(e),n}))},[se,d,f]);return(0,Xe.jsx)(o,{tabIndex:0,autoFocus:!0,onKeyDown:e=>{if(!i||c)return;let t=se(i);if(t){if(e.key===`right`&&t.hasChildren)e.preventDefault(),S(i,!0);else if(e.key===`left`){if(t.hasChildren&&t.isExpanded)e.preventDefault(),S(i,!1);else if(t.parentId!==void 0&&(e.preventDefault(),h.current=!0,S(t.parentId,!1),r)){let e=x.get(t.parentId);e&&r(e)}}}},children:(0,Xe.jsx)(Me,{options:oe,onChange:K.useCallback(e=>{let n=x.get(e);n&&t(n)},[x,t]),onFocus:K.useCallback(e=>{if(h.current){h.current=!1;return}if(g.current!==e&&(g.current=e,r)){let t=x.get(e);t&&r(t)}},[r,x]),onCancel:n,defaultFocusValue:i,visibleOptionCount:a,layout:s,isDisabled:c,hideIndexes:l,onUpFromFirstItem:ee})})}var K,Xe,Ze=e((()=>{K=t(d(),1),g(),je(),Xe=_()}));function Qe(e,t){return Ce(e.replace(/\s+/g,` `).trim(),t)}function $e({before:e,match:t,after:n},r){return f.dim(e)+r(t)+f.dim(n)}function et(e,t,n){let r=e.toLowerCase().indexOf(t.toLowerCase());if(r===-1)return null;let i=r+t.length,a=Math.max(0,r-n),o=Math.min(e.length,i+n),s=e.slice(a,r),c=e.slice(r,i),l=e.slice(i,o);return{before:(a>0?`…`:``)+s.replace(/\s+/g,` `).trimStart(),match:c.trim(),after:l.replace(/\s+/g,` `).trimEnd()+(o<e.length?`…`:``)}}function tt(e,t,n){let{isGroupHeader:r=!1,isChild:i=!1,forkCount:a=0}=n||{},o=r&&a>0?ct:i?lt:0,s=r&&a>0?` (+${a} other ${a===1?`session`:`sessions`})`:``,c=e.isSidechain?` (sidechain)`:``,l=t-o-c.length-s.length;return`${Qe(ye(e),l)}${c}${s}`}function nt(e,t){let{isChild:n=!1,showProjectPath:r=!1}=t||{},i=n?` `:``,a=Te(e),o=r&&e.projectPath?` · ${e.projectPath}`:``;return i+a+o}function rt({logs:e,maxHeight:t=1/0,forceWidth:i,onCancel:d,onSelect:f,onLogsChanged:p,onLoadMore:h,initialSearchQuery:g,showAllProjects:_=!1,onToggleAllProjects:v,onAgenticSearch:y}){let re=ne(),b=i===void 0?re.columns:i,x=ke(d),se=u(),S=de(),[ce]=a(),le=Fe(ce),C=q.useMemo(()=>e=>te(e,le.warning),[le.warning]),[w,ue]=q.useState(null),[D,fe]=q.useState(!1),[O,he]=q.useState(!1),[k,_e]=q.useState(!1),A=q.useMemo(()=>oe(),[]),[ve,j]=q.useState(``),[be,xe]=q.useState(0),[Se,Ce]=q.useState(new Set),[we,Ee]=q.useState(null),[De,Oe]=q.useState(1),[M,N]=q.useState(`list`),[je,Ne]=q.useState(null),Ie=q.useRef(null),[Le,ze]=q.useState(0),[P,F]=q.useState({status:`idle`}),[I,L]=q.useState(!1),Ve=q.useRef(null),{query:R,setQuery:He,cursorOffset:z}=Re({isActive:M===`search`&&P.status!==`searching`,onExit:()=>{N(`list`)},onExitUp:()=>{N(`list`)},passthroughCtrlKeys:[`n`],initialQuery:g||``}),B=q.useDeferredValue(R),[V,H]=q.useState(``);q.useEffect(()=>{if(!B){H(``);return}let e=setTimeout(H,300,B);return()=>clearTimeout(e)},[B]);let[U,We]=q.useState(null),[Ge,Ke]=q.useState(!1);q.useEffect(()=>{ie().then(e=>ue(e)),ge(A).then(e=>{_e(e.length>1)})},[A]);let qe=q.useMemo(()=>new Map(e.map(e=>[e,at(e)])),[e]),Je=q.useMemo(()=>null,[e,qe,!1]),W=q.useMemo(()=>st(e),[e]),G=W.length>0,K=q.useMemo(()=>G?[`All`,...W]:[],[G,W]),Xe=K.length>0&&Le<K.length?Le:0,Ze=K[Xe],rt=Ze===`All`?void 0:Ze,it=+!!G,ct=q.useMemo(()=>{let t=e;return S&&(t=e.filter(e=>{let t=ae(),n=T(e);return!!(t&&n===t||e.customTitle||me(e.messages)||e.firstPrompt||e.customTitle)})),rt!==void 0&&(t=t.filter(e=>e.tag===rt)),D&&w&&(t=t.filter(e=>e.gitBranch===w)),k&&!O&&(t=t.filter(e=>e.projectPath===A)),t},[e,S,rt,D,w,k,O,A]),lt=q.useMemo(()=>{if(!R)return ct;let e=R.toLowerCase();return ct.filter(t=>{let n=ye(t).toLowerCase(),r=(t.gitBranch||``).toLowerCase(),i=(t.tag||``).toLowerCase(),a=t.prNumber?`pr #${t.prNumber} ${t.prRepository||``}`.toLowerCase():``;return n.includes(e)||r.includes(e)||i.includes(e)||a.includes(e)})},[ct,R]);q.useEffect(()=>{},[B,V,!1]),q.useEffect(()=>{We(null),Ke(!1)},[V,Je,!1]);let{filteredLogs:Y,snippets:X}=q.useMemo(()=>{let e=new Map,t=lt;if(U&&V&&U.query===V){for(let t of U.results)if(t.searchableText){let n=et(t.searchableText,V,ut);n&&e.set(t.log,n)}let n=new Set(t.map(e=>e.messages[0]?.uuid)),r=U.results.map(e=>e.log).filter(e=>!n.has(e.messages[0]?.uuid));t=[...t,...r]}return{filteredLogs:t,snippets:e}},[lt,U,V]),Z=q.useMemo(()=>P.status===`results`&&P.results.length>0?P.results:Y,[P,Y]),Q=Math.max(30,b-4),dt=q.useMemo(()=>{if(!S)return[];let e=ot(Z);return Array.from(e.entries()).map(([e,t])=>{let n=t[0],r=Z.indexOf(n),i=X.get(n),a=i?$e(i,C):null;if(t.length===1){let t=nt(n,{showProjectPath:_});return{id:`log:${e}:0`,value:{log:n,indexInFiltered:r},label:tt(n,Q),description:a?`${t}\n ${a}`:t,dimDescription:!0}}let o=t.length-1,s=t.slice(1).map((t,n)=>{let r=Z.indexOf(t),i=X.get(t),a=i?$e(i,C):null,o=nt(t,{isChild:!0,showProjectPath:_});return{id:`log:${e}:${n+1}`,value:{log:t,indexInFiltered:r},label:tt(t,Q,{isChild:!0}),description:a?`${o}\n ${a}`:o,dimDescription:!0}}),c=nt(n,{showProjectPath:_});return{id:`group:${e}`,value:{log:n,indexInFiltered:r},label:tt(n,Q,{isGroupHeader:!0,forkCount:o}),description:a?`${c}\n ${a}`:c,dimDescription:!0,children:s}})},[S,Z,Q,_,X,C]),ft=q.useMemo(()=>S?[]:Z.map((e,t)=>{let n=Qe(ye(e)+(e.isSidechain?` (sidechain)`:``),Q),r=Te(e),i=_&&e.projectPath?` · ${e.projectPath}`:``,a=X.get(e),o=a?$e(a,C):null;return{label:n,description:o?`${r}${i}\n ${o}`:r+i,dimDescription:!0,value:t.toString()}}),[S,Z,C,Q,_,X]),$=we?.value.log??null,pt=()=>{if(!S||!$)return``;let e=T($);if(!e)return``;let t=Z.filter(t=>T(t)===e);if(!(t.length>1))return``;let n=Se.has(e);return t.indexOf($)>0||n?`← to collapse`:`→ to expand`},mt=q.useCallback(async()=>{let e=$?T($):void 0;if(!$||!e){N(`list`),j(``);return}ve.trim()&&(await pe(e,ve.trim(),$.fullPath),S&&p&&p()),N(`list`),j(``)},[$,ve,p,S]),ht=q.useCallback(()=>{N(`list`)},[]),gt=q.useCallback(()=>{N(`search`)},[]),_t=q.useCallback(async()=>{if(!R.trim()||!y||!0)return;Ve.current?.abort();let t=new AbortController;Ve.current=t,F({status:`searching`}),R.length;try{let n=await y(R,e,t.signal);if(t.signal.aborted)return;F({status:`results`,results:n,query:R}),R.length,n.length}catch(e){if(t.signal.aborted)return;F({status:`error`,message:e instanceof Error?e.message:`Search failed`}),R.length}},[R,y,!1,e]);q.useEffect(()=>{P.status!==`idle`&&P.status!==`searching`&&(P.status===`results`&&P.query!==R||P.status===`error`)&&F({status:`idle`})},[R,P]),q.useEffect(()=>()=>{Ve.current?.abort()},[]);let vt=q.useRef(P.status);q.useEffect(()=>{let e=vt.current;if(vt.current=P.status,e===`searching`&&P.status===`results`){if(S&&dt.length>0)Ee(dt[0]);else if(!S&&Z.length>0){let e=Z[0];Ee({id:`0`,value:{log:e,indexInFiltered:0},label:``})}}},[P.status,S,dt,Z]);let yt=q.useCallback(e=>{let t=parseInt(e,10),n=Z[t];!n||Ie.current===t.toString()||(Ie.current=t.toString(),Ee({id:t.toString(),value:{log:n,indexInFiltered:t},label:``}),Oe(t+1))},[Z]),bt=q.useCallback(e=>{Ee(e);let t=Z.findIndex(t=>T(t)===T(e.value.log));t>=0&&Oe(t+1)},[Z]);l(`confirm:no`,()=>{Ve.current?.abort(),F({status:`idle`})},{context:`Confirmation`,isActive:M!==`preview`&&P.status===`searching`}),l(`confirm:no`,()=>{N(`list`),j(``)},{context:`Settings`,isActive:M===`rename`&&P.status!==`searching`}),l(`confirm:no`,()=>{He(``),L(!1),d?.()},{context:`Confirmation`,isActive:M!==`preview`&&M!==`rename`&&M!==`search`&&I&&P.status!==`searching`}),m((e,t)=>{if(M!==`preview`&&P.status!==`searching`&&M!==`rename`)if(M===`search`)e.toLowerCase()===`n`&&t.ctrl?ht():(t.return||t.downArrow)&&R.trim();else{if(I){if(t.return){_t(),L(!1);return}else if(t.downArrow){L(!1);return}else if(t.upArrow){N(`search`),L(!1);return}}if(G&&t.tab){let e=t.shift?-1:1;ze(t=>{let n=((t<K.length?t:0)+K.length+e)%K.length;return K[n],W.length,n});return}let n=!t.ctrl&&!t.meta,r=e.toLowerCase();r===`a`&&t.ctrl&&v?v():r===`b`&&t.ctrl?fe(!D):r===`w`&&t.ctrl&&k?he(!O):r===`/`&&n?N(`search`):r===`r`&&t.ctrl&&$?(N(`rename`),j(``)):r===`v`&&t.ctrl&&$?(Ne($),N(`preview`),$.messageCount):$&&n&&e.length>0&&!/^\s+$/.test(e)&&(N(`search`),He(e))}},{isActive:!0});let xt=[];D&&w&&xt.push(w),k&&!O&&xt.push(`current worktree`);let St=8+ +(xt.length>0&&M!==`search`)+it,Ct=Math.max(1,Math.floor((t-St-2)/3));return q.useEffect(()=>{if(!h)return;let e=Ct*2;De+e>=Z.length&&h(Ct*3)},[De,Ct,Z.length,h]),e.length===0?null:M===`preview`&&je&&S?(0,J.jsx)(Be,{log:je,onExit:()=>{N(`list`),Ne(null)},onSelect:f}):(0,J.jsxs)(o,{flexDirection:`column`,height:t-1,children:[(0,J.jsx)(o,{flexShrink:0,children:(0,J.jsx)(n,{color:`suggestion`})}),(0,J.jsx)(o,{flexShrink:0,children:(0,J.jsx)(s,{children:` `})}),G?(0,J.jsx)(Ue,{tabs:K,selectedIndex:Xe,availableWidth:b,showAllProjects:_}):(0,J.jsx)(o,{flexShrink:0,children:(0,J.jsxs)(s,{bold:!0,color:`suggestion`,children:[`Resume Session`,M===`list`&&Z.length>Ct&&(0,J.jsxs)(s,{dimColor:!0,children:[` `,`(`,De,` of `,Z.length,`)`]})]})}),(0,J.jsx)(ee,{query:R,isFocused:M===`search`,isTerminalFocused:se,cursorOffset:z}),xt.length>0&&M!==`search`&&(0,J.jsx)(o,{flexShrink:0,paddingLeft:2,children:(0,J.jsx)(s,{dimColor:!0,children:(0,J.jsx)(c,{children:xt})})}),(0,J.jsx)(o,{flexShrink:0,children:(0,J.jsx)(s,{children:` `})}),P.status===`searching`&&(0,J.jsxs)(o,{paddingLeft:1,flexShrink:0,children:[(0,J.jsx)(Pe,{}),(0,J.jsx)(s,{children:` Searching…`})]}),P.status===`results`&&P.results.length>0&&(0,J.jsx)(o,{paddingLeft:1,marginBottom:1,flexShrink:0,children:(0,J.jsx)(s,{dimColor:!0,italic:!0,children:`Work Mate found these results:`})}),P.status===`results`&&P.results.length===0&&Y.length===0&&(0,J.jsx)(o,{paddingLeft:1,marginBottom:1,flexShrink:0,children:(0,J.jsx)(s,{dimColor:!0,italic:!0,children:`No matching sessions found.`})}),P.status===`error`&&Y.length===0&&(0,J.jsx)(o,{paddingLeft:1,marginBottom:1,flexShrink:0,children:(0,J.jsx)(s,{dimColor:!0,italic:!0,children:`No matching sessions found.`})}),!!R.trim()&&y&&!1,P.status===`searching`?null:M===`rename`&&$?(0,J.jsxs)(o,{paddingLeft:2,flexDirection:`column`,children:[(0,J.jsx)(s,{bold:!0,children:`Rename session:`}),(0,J.jsx)(o,{paddingTop:1,children:(0,J.jsx)(Ae,{value:ve,onChange:j,onSubmit:mt,placeholder:ye($,`Enter new session name`),columns:b,cursorOffset:be,onChangeCursorOffset:xe,showCursor:!0})})]}):S?(0,J.jsx)(Ye,{nodes:dt,onSelect:e=>{f(e.value.log)},onFocus:bt,onCancel:d,focusNodeId:we?.id,visibleOptionCount:Ct,layout:`expanded`,isDisabled:M===`search`||I,hideIndexes:!1,isNodeExpanded:e=>{if(M===`search`||D)return!0;let t=typeof e==`string`&&e.startsWith(`group:`)?e.substring(6):null;return t?Se.has(t):!1},onExpand:e=>{let t=typeof e==`string`&&e.startsWith(`group:`)?e.substring(6):null;t&&Ce(e=>new Set(e).add(t))},onCollapse:e=>{let t=typeof e==`string`&&e.startsWith(`group:`)?e.substring(6):null;t&&Ce(e=>{let n=new Set(e);return n.delete(t),n})},onUpFromFirstItem:gt}):(0,J.jsx)(Me,{options:ft,onChange:e=>{let t=Z[parseInt(e,10)];t&&f(t)},visibleOptionCount:Ct,onCancel:d,onFocus:yt,defaultFocusValue:we?.id.toString(),layout:`expanded`,isDisabled:M===`search`||I,onUpFromFirstItem:gt}),(0,J.jsx)(o,{paddingLeft:2,children:x.pending?(0,J.jsxs)(s,{dimColor:!0,children:[`Press `,x.keyName,` again to exit`]}):M===`rename`?(0,J.jsx)(s,{dimColor:!0,children:(0,J.jsxs)(c,{children:[(0,J.jsx)(r,{shortcut:`Enter`,action:`save`}),(0,J.jsx)(E,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})}):P.status===`searching`?(0,J.jsx)(s,{dimColor:!0,children:(0,J.jsxs)(c,{children:[(0,J.jsx)(s,{children:`Searching with Work Mate…`}),(0,J.jsx)(E,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})}):I?(0,J.jsx)(s,{dimColor:!0,children:(0,J.jsxs)(c,{children:[(0,J.jsx)(r,{shortcut:`Enter`,action:`search`}),(0,J.jsx)(r,{shortcut:`↓`,action:`skip`}),(0,J.jsx)(E,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})}):M===`search`?(0,J.jsx)(s,{dimColor:!0,children:(0,J.jsxs)(c,{children:[(0,J.jsx)(s,{children:`Type to Search`}),(0,J.jsx)(r,{shortcut:`Enter`,action:`select`}),(0,J.jsx)(E,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`clear`})]})}):(0,J.jsx)(s,{dimColor:!0,children:(0,J.jsxs)(c,{children:[v&&(0,J.jsx)(r,{shortcut:`Ctrl+A`,action:`show ${_?`current dir`:`all projects`}`}),w&&(0,J.jsx)(r,{shortcut:`Ctrl+B`,action:`toggle branch`}),k&&(0,J.jsx)(r,{shortcut:`Ctrl+W`,action:`show ${O?`current worktree`:`all worktrees`}`}),(0,J.jsx)(r,{shortcut:`Ctrl+V`,action:`preview`}),(0,J.jsx)(r,{shortcut:`Ctrl+R`,action:`rename`}),(0,J.jsx)(s,{children:`Type to search`}),(0,J.jsx)(E,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`}),pt()&&(0,J.jsx)(s,{children:pt()})]})})})]})}function it(e){if(e.type!==`user`&&e.type!==`assistant`)return``;let t=`message`in e?e.message?.content:void 0;return t?typeof t==`string`?t:Array.isArray(t)?t.map(e=>typeof e==`string`?e:`text`in e&&typeof e.text==`string`?e.text:``).filter(Boolean).join(` `):``:``}function at(e){let t=(e.messages.length<=Y?e.messages:[...e.messages.slice(0,X),...e.messages.slice(-1e3)]).map(it).filter(Boolean).join(` `),n=`${[e.customTitle,e.summary,e.firstPrompt,e.gitBranch,e.tag,e.prNumber?`PR #${e.prNumber}`:void 0,e.prRepository].filter(Boolean).join(` `)} ${t}`.trim();return n.length>Z?n.slice(0,Z):n}function ot(e){let t=new Map;for(let n of e){let e=T(n);if(e){let r=t.get(e);r?r.push(n):t.set(e,[n])}}return t.forEach(e=>e.sort((e,t)=>new Date(t.modified).getTime()-new Date(e.modified).getTime())),t}function st(e){let t=new Set;for(let n of e)n.tag&&t.add(n.tag);return Array.from(t).sort((e,t)=>e.localeCompare(t))}var q,J,ct,lt,Y,X,Z,ut,Q=e((()=>{p(),q=t(d(),1),b(),M(),ze(),fe(),g(),O(),Se(),we(),le(),y(),be(),he(),Ie(),w(),je(),Le(),Ve(),Ne(),G(),N(),Ze(),J=_(),ct=2,lt=4,Y=2e3,X=1e3,Z=5e4,ut=50}));function dt(e){if(e.type!==`user`&&e.type!==`assistant`)return``;let t=`message`in e?e.message?.content:void 0;return t?typeof t==`string`?t:Array.isArray(t)?t.map(e=>typeof e==`string`?e:`text`in e&&typeof e.text==`string`?e.text:``).filter(Boolean).join(` `):``:``}function ft(e){if(e.length===0)return``;let t=(e.length<=ht?e:[...e.slice(0,ht/2),...e.slice(-100/2)]).map(dt).filter(Boolean).join(` `).replace(/\s+/g,` `).trim();return t.length>mt?`${t.slice(0,mt)}…`:t}function $(e,t){return!!(ye(e).toLowerCase().includes(t)||e.customTitle?.toLowerCase().includes(t)||e.tag?.toLowerCase().includes(t)||e.gitBranch?.toLowerCase().includes(t)||e.summary?.toLowerCase().includes(t)||e.firstPrompt?.toLowerCase().includes(t)||e.messages&&e.messages.length>0&&ft(e.messages).toLowerCase().includes(t))}async function pt(e,t,n){if(!e.trim()||t.length===0)return[];let r=e.toLowerCase(),i=t.filter(e=>$(e,r)),a;if(i.length>=gt)a=i.slice(0,gt);else{let e=t.filter(e=>!$(e,r)),n=gt-i.length;a=[...i,...e.slice(0,n)]}A(`Agentic search: ${a.length}/${t.length} logs, query="${e}", matching: ${i.length}, with messages: ${re(a,e=>e.messages?.length>0)}`);let o=a.map(async e=>{if(C(e))try{return await x(e)}catch(t){return xe(t),e}return e}),s=await Promise.all(o);A(`Agentic search: loaded ${re(s,e=>e.messages?.length>0)}/${a.length} logs with transcripts`);let c=`Sessions:
2
+ ${s.map((e,t)=>{let n=[`${t}:`],r=ye(e);if(n.push(r),e.customTitle&&e.customTitle!==r&&n.push(`[custom title: ${e.customTitle}]`),e.tag&&n.push(`[tag: ${e.tag}]`),e.gitBranch&&n.push(`[branch: ${e.gitBranch}]`),e.summary&&n.push(`- Summary: ${e.summary}`),e.firstPrompt&&e.firstPrompt!==`No prompt`&&n.push(`- First message: ${e.firstPrompt.slice(0,300)}`),e.messages&&e.messages.length>0){let t=ft(e.messages);t&&n.push(`- Transcript: ${t}`)}return n.join(` `)}).join(`
3
+ `)}
4
+
5
+ Search query: "${e}"
6
+
7
+ Find the sessions that are most relevant to this query.`;A(`Agentic search prompt (first 500 chars): ${c.slice(0,500)}...`);try{let e=Oe();A(`Agentic search using model: ${e}`);let t=(await k({model:e,system:_t,messages:[{role:`user`,content:c}],signal:n,querySource:`session_search`})).content.find(e=>e.type===`text`);if(t?.type!==`text`)return A(`No text content in agentic search response`),[];A(`Agentic search response: ${t.text}`);let r=t.text.match(/\{[\s\S]*\}/);if(!r)return A(`Could not find JSON in agentic search response`),[];let i=(_e(r[0]).relevant_indices||[]).filter(e=>e>=0&&e<s.length).map(e=>s[e]);return A(`Agentic search found ${i.length} relevant sessions`),i}catch(e){return xe(e),A(`Agentic search error: ${e}`),[]}}var mt,ht,gt,_t,vt=e((()=>{v(),ve(),be(),De(),he(),ue(),j(),mt=2e3,ht=100,gt=100,_t=`Your goal is to find relevant sessions based on a user's search query.
8
+
9
+ You will be given a list of sessions with their metadata and a search query. Identify which sessions are most relevant to the query.
10
+
11
+ Each session may include:
12
+ - Title (display name or custom title)
13
+ - Tag (user-assigned category, shown as [tag: name] - users tag sessions with /tag command to categorize them)
14
+ - Branch (git branch name, shown as [branch: name])
15
+ - Summary (AI-generated summary)
16
+ - First message (beginning of the conversation)
17
+ - Transcript (excerpt of conversation content)
18
+
19
+ IMPORTANT: Tags are user-assigned labels that indicate the session's topic or category. If the query matches a tag exactly or partially, those sessions should be highly prioritized.
20
+
21
+ For each session, consider (in order of priority):
22
+ 1. Exact tag matches (highest priority - user explicitly categorized this session)
23
+ 2. Partial tag matches or tag-related terms
24
+ 3. Title matches (custom titles or first message content)
25
+ 4. Branch name matches
26
+ 5. Summary and transcript content matches
27
+ 6. Semantic similarity and related concepts
28
+
29
+ CRITICAL: Be VERY inclusive in your matching. Include sessions that:
30
+ - Contain the query term anywhere in any field
31
+ - Are semantically related to the query (e.g., "testing" matches sessions about "tests", "unit tests", "QA", etc.)
32
+ - Discuss topics that could be related to the query
33
+ - Have transcripts that mention the concept even in passing
34
+
35
+ When in doubt, INCLUDE the session. It's better to return too many results than too few. The user can easily scan through results, but missing relevant sessions is frustrating.
36
+
37
+ Return sessions ordered by relevance (most relevant first). If truly no sessions have ANY connection to the query, return an empty array - but this should be rare.
38
+
39
+ Respond with ONLY the JSON object, no markdown formatting:
40
+ {"relevant_indices": [2, 5, 0]}`}));function yt(e,t){let n=oe();if(!t||!e.projectPath||e.projectPath===n)return{isCrossProject:!1};let r=T(e);return{isCrossProject:!0,isSameRepoWorktree:!1,command:`cd ${se([e.projectPath])} && claude --resume ${r}`,projectPath:e.projectPath}}var bt=e((()=>{b(),ce(),he()}));export{rt as a,vt as i,bt as n,Q as o,pt as r,yt as t};
@@ -1,4 +1,4 @@
1
- import{n as e,r as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./memoize-BK3gG5ob.js";import{i,l as a,o}from"./envUtils-QyzA_cFM.js";import{n as s,t as c}from"./defineProperty-C-QyHrDq.js";import{Pt as l,at as u}from"./state-CXY-q5gr.js";import{a as ee,n as d}from"./process-gEbdy6uY.js";import{homedir as f}from"os";import*as p from"path";import{dirname as te,join as ne,resolve as re}from"path";import*as m from"fs";import{closeSync as ie,fsyncSync as ae,openSync as oe,writeFileSync as se}from"fs";import{appendFile as ce,mkdir as le,open as ue,readFile as de,readdir as fe,rename as pe,rm as me,rmdir as he,stat as ge,symlink as _e,unlink as ve}from"fs/promises";function ye({writeFn:e,flushIntervalMs:t=1e3,maxBufferSize:n=100,maxBufferBytes:r=1/0,immediateMode:i=!1}){let a=[],o=0,s=null,c=null;function l(){s&&(clearTimeout(s),s=null)}function u(){c&&(e(c.join(``)),c=null),a.length!==0&&(e(a.join(``)),a=[],o=0,l())}function ee(){s||(s=setTimeout(u,t))}function d(){if(c){c.push(...a),a=[],o=0,l();return}let t=a;a=[],o=0,l(),c=t,setImmediate(()=>{let t=c;c=null,t&&e(t.join(``))})}return{write(t){if(i){e(t);return}a.push(t),o+=t.length,ee(),(a.length>=n||o>=r)&&d()},flush:u,dispose(){u()}}}var be=e((()=>{}));function xe(e){return Ce.add(e),()=>Ce.delete(e)}async function Se(){await Promise.all(Array.from(Ce).map(e=>e()))}var Ce,we=e((()=>{Ce=new Set}));function Te(e){let t=[],n=e.match(/^MCP server ["']([^"']+)["']/);if(n?.[1])t.push(`mcp`),t.push(n[1].toLowerCase());else{let n=e.match(/^([^:[]+):/);n?.[1]&&t.push(n[1].trim().toLowerCase())}let r=e.match(/^\[([^\]]+)]/);r?.[1]&&t.push(r[1].trim().toLowerCase()),e.toLowerCase().includes(`1p event:`)&&t.push(`1p`);let i=e.match(/:\s*([^:]+?)(?:\s+(?:type|mode|status|event))?:/);if(i?.[1]){let e=i[1].trim().toLowerCase();e.length<30&&!e.includes(` `)&&t.push(e)}return Array.from(new Set(t))}function Ee(e,t){return t?e.length===0?!1:t.isExclusive?!e.some(e=>t.exclude.includes(e)):e.some(e=>t.include.includes(e)):!0}function De(e,t){return!t||Ee(Te(e),t)}var Oe,ke=e((()=>{r(),Oe=n(e=>{if(!e||e.trim()===``)return null;let t=e.split(`,`).map(e=>e.trim()).filter(Boolean);if(t.length===0)return null;let n=t.some(e=>e.startsWith(`!`)),r=t.some(e=>!e.startsWith(`!`));if(n&&r)return null;let i=t.map(e=>e.replace(/^!/,``).toLowerCase());return{include:n?[]:i,exclude:n?i:[],isExclusive:n}})}));function h(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n}function g(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)}var _=e((()=>{})),Ae,je=e((()=>{Ae=function(){let{crypto:e}=globalThis;if(e?.randomUUID)return Ae=e.randomUUID.bind(e),e.randomUUID();let t=new Uint8Array(1),n=e?()=>e.getRandomValues(t)[0]:()=>Math.random()*255&255;return`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,e=>(e^n()&15>>e/4).toString(16))}}));function Me(e){return typeof e==`object`&&!!e&&(`name`in e&&e.name===`AbortError`||`message`in e&&String(e.message).includes(`FetchRequestCanceledException`))}var Ne,Pe=e((()=>{Ne=e=>{if(e instanceof Error)return e;if(typeof e==`object`&&e){try{if(Object.prototype.toString.call(e)===`[object Error]`){let t=Error(e.message,e.cause?{cause:e.cause}:{});return e.stack&&(t.stack=e.stack),e.cause&&!t.cause&&(t.cause=e.cause),e.name&&(t.name=e.name),t}}catch{}try{return Error(JSON.stringify(e))}catch{}}return Error(e)}})),v,y,b,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,x=e((()=>{Pe(),v=class extends Error{},y=class e extends v{constructor(t,n,r,i,a){super(`${e.makeMessage(t,n,r)}`),this.status=t,this.headers=i,this.requestID=i?.get(`request-id`),this.error=n,this.type=a??null}static makeMessage(e,t,n){let r=t?.message?typeof t.message==`string`?t.message:JSON.stringify(t.message):t?JSON.stringify(t):n;return e&&r?`${e} ${r}`:e?`${e} status code (no body)`:r||`(no status code or body)`}static generate(t,n,r,i){if(!t||!i)return new Fe({message:r,cause:Ne(n)});let a=n,o=a?.error?.type;return t===400?new Le(t,a,r,i,o):t===401?new Re(t,a,r,i,o):t===403?new ze(t,a,r,i,o):t===404?new Be(t,a,r,i,o):t===409?new Ve(t,a,r,i,o):t===422?new He(t,a,r,i,o):t===429?new Ue(t,a,r,i,o):t>=500?new We(t,a,r,i,o):new e(t,a,r,i,o)}},b=class extends y{constructor({message:e}={}){super(void 0,void 0,e||`Request was aborted.`,void 0)}},Fe=class extends y{constructor({message:e,cause:t}){super(void 0,void 0,e||`Connection error.`,void 0),t&&(this.cause=t)}},Ie=class extends Fe{constructor({message:e}={}){super({message:e??`Request timed out.`})}},Le=class extends y{},Re=class extends y{},ze=class extends y{},Be=class extends y{},Ve=class extends y{},He=class extends y{},Ue=class extends y{},We=class extends y{}}));function Ge(e){return typeof e==`object`?e??{}:{}}function Ke(e){if(!e)return!0;for(let t in e)return!1;return!0}function qe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Je,Ye,Xe,Ze,Qe,$e,et=e((()=>{x(),Je=/^[a-z][a-z0-9+.-]*:/i,Ye=e=>Je.test(e),Xe=e=>(Xe=Array.isArray,Xe(e)),Ze=Xe,Qe=(e,t)=>{if(typeof t!=`number`||!Number.isInteger(t))throw new v(`${e} must be an integer`);if(t<0)throw new v(`${e} must be a positive integer`);return t},$e=e=>{try{return JSON.parse(e)}catch{return}}})),tt,nt=e((()=>{tt=e=>new Promise(t=>setTimeout(t,e))})),S,rt=e((()=>{S=`0.81.0`}));function it(){return typeof Deno<`u`&&Deno.build!=null?`deno`:typeof EdgeRuntime<`u`?`edge`:Object.prototype.toString.call(globalThis.process===void 0?0:globalThis.process)===`[object process]`?`node`:`unknown`}function at(){if(typeof navigator>`u`||!navigator)return null;for(let{key:e,pattern:t}of[{key:`edge`,pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:`ie`,pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:`ie`,pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:`chrome`,pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:`firefox`,pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:`safari`,pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}]){let n=t.exec(navigator.userAgent);if(n)return{browser:e,version:`${n[1]||0}.${n[2]||0}.${n[3]||0}`}}return null}var ot,st,ct,lt,ut,dt,ft=e((()=>{rt(),ot=()=>typeof window<`u`&&window.document!==void 0&&typeof navigator<`u`,st=()=>{let e=it();if(e===`deno`)return{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":S,"X-Stainless-OS":lt(Deno.build.os),"X-Stainless-Arch":ct(Deno.build.arch),"X-Stainless-Runtime":`deno`,"X-Stainless-Runtime-Version":typeof Deno.version==`string`?Deno.version:Deno.version?.deno??`unknown`};if(typeof EdgeRuntime<`u`)return{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":S,"X-Stainless-OS":`Unknown`,"X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":`edge`,"X-Stainless-Runtime-Version":globalThis.process.version};if(e===`node`)return{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":S,"X-Stainless-OS":lt(globalThis.process.platform??`unknown`),"X-Stainless-Arch":ct(globalThis.process.arch??`unknown`),"X-Stainless-Runtime":`node`,"X-Stainless-Runtime-Version":globalThis.process.version??`unknown`};let t=at();return t?{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":S,"X-Stainless-OS":`Unknown`,"X-Stainless-Arch":`unknown`,"X-Stainless-Runtime":`browser:${t.browser}`,"X-Stainless-Runtime-Version":t.version}:{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":S,"X-Stainless-OS":`Unknown`,"X-Stainless-Arch":`unknown`,"X-Stainless-Runtime":`unknown`,"X-Stainless-Runtime-Version":`unknown`}},ct=e=>e===`x32`?`x32`:e===`x86_64`||e===`x64`?`x64`:e===`arm`?`arm`:e===`aarch64`||e===`arm64`?`arm64`:e?`other:${e}`:`unknown`,lt=e=>(e=e.toLowerCase(),e.includes(`ios`)?`iOS`:e===`android`?`Android`:e===`darwin`?`MacOS`:e===`win32`?`Windows`:e===`freebsd`?`FreeBSD`:e===`openbsd`?`OpenBSD`:e===`linux`?`Linux`:e?`Other:${e}`:`Unknown`),dt=()=>ut??(ut=st())}));function pt(){if(typeof fetch<`u`)return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function mt(...e){let t=globalThis.ReadableStream;if(t===void 0)throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new t(...e)}function ht(e){let t=Symbol.asyncIterator in e?e[Symbol.asyncIterator]():e[Symbol.iterator]();return mt({start(){},async pull(e){let{done:n,value:r}=await t.next();n?e.close():e.enqueue(r)},async cancel(){await t.return?.()}})}function gt(e){if(e[Symbol.asyncIterator])return e;let t=e.getReader();return{async next(){try{let e=await t.read();return e?.done&&t.releaseLock(),e}catch(e){throw t.releaseLock(),e}},async return(){let e=t.cancel();return t.releaseLock(),await e,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function _t(e){if(typeof e!=`object`||!e)return;if(e[Symbol.asyncIterator]){await e[Symbol.asyncIterator]().return?.();return}let t=e.getReader(),n=t.cancel();t.releaseLock(),await n}var vt=e((()=>{})),yt,bt=e((()=>{yt=({headers:e,body:t})=>({bodyHeaders:{"content-type":`application/json`},body:JSON.stringify(t)})}));function xt(e){return Object.entries(e).filter(([e,t])=>t!==void 0).map(([e,t])=>{if(typeof t==`string`||typeof t==`number`||typeof t==`boolean`)return`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;if(t===null)return`${encodeURIComponent(e)}=`;throw new v(`Cannot stringify type ${typeof t}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join(`&`)}var St=e((()=>{x()}));function Ct(e){let t=0;for(let n of e)t+=n.length;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function wt(e){let t;return(Et??(t=new globalThis.TextEncoder,Et=t.encode.bind(t)))(e)}function Tt(e){let t;return(Dt??(t=new globalThis.TextDecoder,Dt=t.decode.bind(t)))(e)}var Et,Dt,Ot=e((()=>{}));function kt(e,t){for(let n=t??0;n<e.length;n++){if(e[n]===10)return{preceding:n,index:n+1,carriage:!1};if(e[n]===13)return{preceding:n,index:n+1,carriage:!0}}return null}function At(e){for(let t=0;t<e.length-1;t++){if(e[t]===10&&e[t+1]===10||e[t]===13&&e[t+1]===13)return t+2;if(e[t]===13&&e[t+1]===10&&t+3<e.length&&e[t+2]===13&&e[t+3]===10)return t+4}return-1}var C,w,jt,Mt=e((()=>{_(),Ot(),jt=class{constructor(){C.set(this,void 0),w.set(this,void 0),h(this,C,new Uint8Array,`f`),h(this,w,null,`f`)}decode(e){if(e==null)return[];let t=e instanceof ArrayBuffer?new Uint8Array(e):typeof e==`string`?wt(e):e;h(this,C,Ct([g(this,C,`f`),t]),`f`);let n=[],r;for(;(r=kt(g(this,C,`f`),g(this,w,`f`)))!=null;){if(r.carriage&&g(this,w,`f`)==null){h(this,w,r.index,`f`);continue}if(g(this,w,`f`)!=null&&(r.index!==g(this,w,`f`)+1||r.carriage)){n.push(Tt(g(this,C,`f`).subarray(0,g(this,w,`f`)-1))),h(this,C,g(this,C,`f`).subarray(g(this,w,`f`)),`f`),h(this,w,null,`f`);continue}let e=g(this,w,`f`)===null?r.preceding:r.preceding-1,t=Tt(g(this,C,`f`).subarray(0,e));n.push(t),h(this,C,g(this,C,`f`).subarray(r.index),`f`),h(this,w,null,`f`)}return n}flush(){return g(this,C,`f`).length?this.decode(`
1
+ import{n as e,r as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./memoize-BK3gG5ob.js";import{i,l as a,o}from"./envUtils-QyzA_cFM.js";import{n as s,t as c}from"./defineProperty-C-QyHrDq.js";import{Pt as l,at as u}from"./state-CXY-q5gr.js";import{n as ee,o as d}from"./process-CewWh77C.js";import{homedir as f}from"os";import*as p from"path";import{dirname as te,join as ne,resolve as re}from"path";import*as m from"fs";import{closeSync as ie,fsyncSync as ae,openSync as oe,writeFileSync as se}from"fs";import{appendFile as ce,mkdir as le,open as ue,readFile as de,readdir as fe,rename as pe,rm as me,rmdir as he,stat as ge,symlink as _e,unlink as ve}from"fs/promises";function ye({writeFn:e,flushIntervalMs:t=1e3,maxBufferSize:n=100,maxBufferBytes:r=1/0,immediateMode:i=!1}){let a=[],o=0,s=null,c=null;function l(){s&&(clearTimeout(s),s=null)}function u(){c&&(e(c.join(``)),c=null),a.length!==0&&(e(a.join(``)),a=[],o=0,l())}function ee(){s||(s=setTimeout(u,t))}function d(){if(c){c.push(...a),a=[],o=0,l();return}let t=a;a=[],o=0,l(),c=t,setImmediate(()=>{let t=c;c=null,t&&e(t.join(``))})}return{write(t){if(i){e(t);return}a.push(t),o+=t.length,ee(),(a.length>=n||o>=r)&&d()},flush:u,dispose(){u()}}}var be=e((()=>{}));function xe(e){return Ce.add(e),()=>Ce.delete(e)}async function Se(){await Promise.all(Array.from(Ce).map(e=>e()))}var Ce,we=e((()=>{Ce=new Set}));function Te(e){let t=[],n=e.match(/^MCP server ["']([^"']+)["']/);if(n?.[1])t.push(`mcp`),t.push(n[1].toLowerCase());else{let n=e.match(/^([^:[]+):/);n?.[1]&&t.push(n[1].trim().toLowerCase())}let r=e.match(/^\[([^\]]+)]/);r?.[1]&&t.push(r[1].trim().toLowerCase()),e.toLowerCase().includes(`1p event:`)&&t.push(`1p`);let i=e.match(/:\s*([^:]+?)(?:\s+(?:type|mode|status|event))?:/);if(i?.[1]){let e=i[1].trim().toLowerCase();e.length<30&&!e.includes(` `)&&t.push(e)}return Array.from(new Set(t))}function Ee(e,t){return t?e.length===0?!1:t.isExclusive?!e.some(e=>t.exclude.includes(e)):e.some(e=>t.include.includes(e)):!0}function De(e,t){return!t||Ee(Te(e),t)}var Oe,ke=e((()=>{r(),Oe=n(e=>{if(!e||e.trim()===``)return null;let t=e.split(`,`).map(e=>e.trim()).filter(Boolean);if(t.length===0)return null;let n=t.some(e=>e.startsWith(`!`)),r=t.some(e=>!e.startsWith(`!`));if(n&&r)return null;let i=t.map(e=>e.replace(/^!/,``).toLowerCase());return{include:n?[]:i,exclude:n?i:[],isExclusive:n}})}));function h(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n}function g(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)}var _=e((()=>{})),Ae,je=e((()=>{Ae=function(){let{crypto:e}=globalThis;if(e?.randomUUID)return Ae=e.randomUUID.bind(e),e.randomUUID();let t=new Uint8Array(1),n=e?()=>e.getRandomValues(t)[0]:()=>Math.random()*255&255;return`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,e=>(e^n()&15>>e/4).toString(16))}}));function Me(e){return typeof e==`object`&&!!e&&(`name`in e&&e.name===`AbortError`||`message`in e&&String(e.message).includes(`FetchRequestCanceledException`))}var Ne,Pe=e((()=>{Ne=e=>{if(e instanceof Error)return e;if(typeof e==`object`&&e){try{if(Object.prototype.toString.call(e)===`[object Error]`){let t=Error(e.message,e.cause?{cause:e.cause}:{});return e.stack&&(t.stack=e.stack),e.cause&&!t.cause&&(t.cause=e.cause),e.name&&(t.name=e.name),t}}catch{}try{return Error(JSON.stringify(e))}catch{}}return Error(e)}})),v,y,b,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,x=e((()=>{Pe(),v=class extends Error{},y=class e extends v{constructor(t,n,r,i,a){super(`${e.makeMessage(t,n,r)}`),this.status=t,this.headers=i,this.requestID=i?.get(`request-id`),this.error=n,this.type=a??null}static makeMessage(e,t,n){let r=t?.message?typeof t.message==`string`?t.message:JSON.stringify(t.message):t?JSON.stringify(t):n;return e&&r?`${e} ${r}`:e?`${e} status code (no body)`:r||`(no status code or body)`}static generate(t,n,r,i){if(!t||!i)return new Fe({message:r,cause:Ne(n)});let a=n,o=a?.error?.type;return t===400?new Le(t,a,r,i,o):t===401?new Re(t,a,r,i,o):t===403?new ze(t,a,r,i,o):t===404?new Be(t,a,r,i,o):t===409?new Ve(t,a,r,i,o):t===422?new He(t,a,r,i,o):t===429?new Ue(t,a,r,i,o):t>=500?new We(t,a,r,i,o):new e(t,a,r,i,o)}},b=class extends y{constructor({message:e}={}){super(void 0,void 0,e||`Request was aborted.`,void 0)}},Fe=class extends y{constructor({message:e,cause:t}){super(void 0,void 0,e||`Connection error.`,void 0),t&&(this.cause=t)}},Ie=class extends Fe{constructor({message:e}={}){super({message:e??`Request timed out.`})}},Le=class extends y{},Re=class extends y{},ze=class extends y{},Be=class extends y{},Ve=class extends y{},He=class extends y{},Ue=class extends y{},We=class extends y{}}));function Ge(e){return typeof e==`object`?e??{}:{}}function Ke(e){if(!e)return!0;for(let t in e)return!1;return!0}function qe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Je,Ye,Xe,Ze,Qe,$e,et=e((()=>{x(),Je=/^[a-z][a-z0-9+.-]*:/i,Ye=e=>Je.test(e),Xe=e=>(Xe=Array.isArray,Xe(e)),Ze=Xe,Qe=(e,t)=>{if(typeof t!=`number`||!Number.isInteger(t))throw new v(`${e} must be an integer`);if(t<0)throw new v(`${e} must be a positive integer`);return t},$e=e=>{try{return JSON.parse(e)}catch{return}}})),tt,nt=e((()=>{tt=e=>new Promise(t=>setTimeout(t,e))})),S,rt=e((()=>{S=`0.81.0`}));function it(){return typeof Deno<`u`&&Deno.build!=null?`deno`:typeof EdgeRuntime<`u`?`edge`:Object.prototype.toString.call(globalThis.process===void 0?0:globalThis.process)===`[object process]`?`node`:`unknown`}function at(){if(typeof navigator>`u`||!navigator)return null;for(let{key:e,pattern:t}of[{key:`edge`,pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:`ie`,pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:`ie`,pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:`chrome`,pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:`firefox`,pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:`safari`,pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}]){let n=t.exec(navigator.userAgent);if(n)return{browser:e,version:`${n[1]||0}.${n[2]||0}.${n[3]||0}`}}return null}var ot,st,ct,lt,ut,dt,ft=e((()=>{rt(),ot=()=>typeof window<`u`&&window.document!==void 0&&typeof navigator<`u`,st=()=>{let e=it();if(e===`deno`)return{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":S,"X-Stainless-OS":lt(Deno.build.os),"X-Stainless-Arch":ct(Deno.build.arch),"X-Stainless-Runtime":`deno`,"X-Stainless-Runtime-Version":typeof Deno.version==`string`?Deno.version:Deno.version?.deno??`unknown`};if(typeof EdgeRuntime<`u`)return{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":S,"X-Stainless-OS":`Unknown`,"X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":`edge`,"X-Stainless-Runtime-Version":globalThis.process.version};if(e===`node`)return{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":S,"X-Stainless-OS":lt(globalThis.process.platform??`unknown`),"X-Stainless-Arch":ct(globalThis.process.arch??`unknown`),"X-Stainless-Runtime":`node`,"X-Stainless-Runtime-Version":globalThis.process.version??`unknown`};let t=at();return t?{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":S,"X-Stainless-OS":`Unknown`,"X-Stainless-Arch":`unknown`,"X-Stainless-Runtime":`browser:${t.browser}`,"X-Stainless-Runtime-Version":t.version}:{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":S,"X-Stainless-OS":`Unknown`,"X-Stainless-Arch":`unknown`,"X-Stainless-Runtime":`unknown`,"X-Stainless-Runtime-Version":`unknown`}},ct=e=>e===`x32`?`x32`:e===`x86_64`||e===`x64`?`x64`:e===`arm`?`arm`:e===`aarch64`||e===`arm64`?`arm64`:e?`other:${e}`:`unknown`,lt=e=>(e=e.toLowerCase(),e.includes(`ios`)?`iOS`:e===`android`?`Android`:e===`darwin`?`MacOS`:e===`win32`?`Windows`:e===`freebsd`?`FreeBSD`:e===`openbsd`?`OpenBSD`:e===`linux`?`Linux`:e?`Other:${e}`:`Unknown`),dt=()=>ut??(ut=st())}));function pt(){if(typeof fetch<`u`)return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function mt(...e){let t=globalThis.ReadableStream;if(t===void 0)throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new t(...e)}function ht(e){let t=Symbol.asyncIterator in e?e[Symbol.asyncIterator]():e[Symbol.iterator]();return mt({start(){},async pull(e){let{done:n,value:r}=await t.next();n?e.close():e.enqueue(r)},async cancel(){await t.return?.()}})}function gt(e){if(e[Symbol.asyncIterator])return e;let t=e.getReader();return{async next(){try{let e=await t.read();return e?.done&&t.releaseLock(),e}catch(e){throw t.releaseLock(),e}},async return(){let e=t.cancel();return t.releaseLock(),await e,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function _t(e){if(typeof e!=`object`||!e)return;if(e[Symbol.asyncIterator]){await e[Symbol.asyncIterator]().return?.();return}let t=e.getReader(),n=t.cancel();t.releaseLock(),await n}var vt=e((()=>{})),yt,bt=e((()=>{yt=({headers:e,body:t})=>({bodyHeaders:{"content-type":`application/json`},body:JSON.stringify(t)})}));function xt(e){return Object.entries(e).filter(([e,t])=>t!==void 0).map(([e,t])=>{if(typeof t==`string`||typeof t==`number`||typeof t==`boolean`)return`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;if(t===null)return`${encodeURIComponent(e)}=`;throw new v(`Cannot stringify type ${typeof t}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join(`&`)}var St=e((()=>{x()}));function Ct(e){let t=0;for(let n of e)t+=n.length;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function wt(e){let t;return(Et??(t=new globalThis.TextEncoder,Et=t.encode.bind(t)))(e)}function Tt(e){let t;return(Dt??(t=new globalThis.TextDecoder,Dt=t.decode.bind(t)))(e)}var Et,Dt,Ot=e((()=>{}));function kt(e,t){for(let n=t??0;n<e.length;n++){if(e[n]===10)return{preceding:n,index:n+1,carriage:!1};if(e[n]===13)return{preceding:n,index:n+1,carriage:!0}}return null}function At(e){for(let t=0;t<e.length-1;t++){if(e[t]===10&&e[t+1]===10||e[t]===13&&e[t+1]===13)return t+2;if(e[t]===13&&e[t+1]===10&&t+3<e.length&&e[t+2]===13&&e[t+3]===10)return t+4}return-1}var C,w,jt,Mt=e((()=>{_(),Ot(),jt=class{constructor(){C.set(this,void 0),w.set(this,void 0),h(this,C,new Uint8Array,`f`),h(this,w,null,`f`)}decode(e){if(e==null)return[];let t=e instanceof ArrayBuffer?new Uint8Array(e):typeof e==`string`?wt(e):e;h(this,C,Ct([g(this,C,`f`),t]),`f`);let n=[],r;for(;(r=kt(g(this,C,`f`),g(this,w,`f`)))!=null;){if(r.carriage&&g(this,w,`f`)==null){h(this,w,r.index,`f`);continue}if(g(this,w,`f`)!=null&&(r.index!==g(this,w,`f`)+1||r.carriage)){n.push(Tt(g(this,C,`f`).subarray(0,g(this,w,`f`)-1))),h(this,C,g(this,C,`f`).subarray(g(this,w,`f`)),`f`),h(this,w,null,`f`);continue}let e=g(this,w,`f`)===null?r.preceding:r.preceding-1,t=Tt(g(this,C,`f`).subarray(0,e));n.push(t),h(this,C,g(this,C,`f`).subarray(r.index),`f`),h(this,w,null,`f`)}return n}flush(){return g(this,C,`f`).length?this.decode(`
2
2
  `):[]}},C=new WeakMap,w=new WeakMap,jt.NEWLINE_CHARS=new Set([`
3
3
  `,`\r`]),jt.NEWLINE_REGEXP=/\r\n|[\n\r]/g}));function Nt(){}function Pt(e,t,n){return!t||Ft[e]>Ft[n]?Nt:t[e].bind(t)}function T(e){let t=e.logger,n=e.logLevel??`off`;if(!t)return Lt;let r=Rt.get(t);if(r&&r[0]===n)return r[1];let i={error:Pt(`error`,t,n),warn:Pt(`warn`,t,n),info:Pt(`info`,t,n),debug:Pt(`debug`,t,n)};return Rt.set(t,[n,i]),i}var Ft,It,Lt,Rt,E,zt=e((()=>{et(),Ft={off:0,error:200,warn:300,info:400,debug:500},It=(e,t,n)=>{if(e){if(qe(Ft,e))return e;T(n).warn(`${t} was set to ${JSON.stringify(e)}, expected one of ${JSON.stringify(Object.keys(Ft))}`)}},Lt={error:Nt,warn:Nt,info:Nt,debug:Nt},Rt=new WeakMap,E=e=>(e.options&&(e.options={...e.options},delete e.options.headers),e.headers&&(e.headers=Object.fromEntries((e.headers instanceof Headers?[...e.headers]:Object.entries(e.headers)).map(([e,t])=>[e,e.toLowerCase()===`x-api-key`||e.toLowerCase()===`authorization`||e.toLowerCase()===`cookie`||e.toLowerCase()===`set-cookie`?`***`:t]))),`retryOfRequestLogID`in e&&(e.retryOfRequestLogID&&(e.retryOf=e.retryOfRequestLogID),delete e.retryOfRequestLogID),e)}));async function*Bt(e,t){if(!e.body)throw t.abort(),globalThis.navigator!==void 0&&globalThis.navigator.product===`ReactNative`?new v(`The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api`):new v(`Attempted to iterate over a response with no body`);let n=new Gt,r=new jt,i=gt(e.body);for await(let e of Vt(i))for(let t of r.decode(e)){let e=n.decode(t);e&&(yield e)}for(let e of r.flush()){let t=n.decode(e);t&&(yield t)}}async function*Vt(e){let t=new Uint8Array;for await(let n of e){if(n==null)continue;let e=n instanceof ArrayBuffer?new Uint8Array(n):typeof n==`string`?wt(n):n,r=new Uint8Array(t.length+e.length);r.set(t),r.set(e,t.length),t=r;let i;for(;(i=At(t))!==-1;)yield t.slice(0,i),t=t.slice(i)}t.length>0&&(yield t)}function Ht(e,t){let n=e.indexOf(t);return n===-1?[e,``,``]:[e.substring(0,n),t,e.substring(n+t.length)]}var Ut,Wt,Gt,Kt=e((()=>{_(),x(),vt(),Mt(),Pe(),et(),Ot(),zt(),Wt=class e{constructor(e,t,n){this.iterator=e,Ut.set(this,void 0),this.controller=t,h(this,Ut,n,`f`)}static fromSSEResponse(t,n,r){let i=!1,a=r?T(r):console;async function*o(){if(i)throw new v("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");i=!0;let e=!1;try{for await(let e of Bt(t,n)){if(e.event===`completion`)try{yield JSON.parse(e.data)}catch(t){throw a.error(`Could not parse message into JSON:`,e.data),a.error(`From chunk:`,e.raw),t}if(e.event===`message_start`||e.event===`message_delta`||e.event===`message_stop`||e.event===`content_block_start`||e.event===`content_block_delta`||e.event===`content_block_stop`)try{yield JSON.parse(e.data)}catch(t){throw a.error(`Could not parse message into JSON:`,e.data),a.error(`From chunk:`,e.raw),t}if(e.event!==`ping`&&e.event===`error`){let n=$e(e.data)??e.data,r=n?.error?.type;throw new y(void 0,n,void 0,t.headers,r)}}e=!0}catch(e){if(Me(e))return;throw e}finally{e||n.abort()}}return new e(o,n,r)}static fromReadableStream(t,n,r){let i=!1;async function*a(){let e=new jt,n=gt(t);for await(let t of n)for(let n of e.decode(t))yield n;for(let t of e.flush())yield t}async function*o(){if(i)throw new v("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");i=!0;let e=!1;try{for await(let t of a())e||t&&(yield JSON.parse(t));e=!0}catch(e){if(Me(e))return;throw e}finally{e||n.abort()}}return new e(o,n,r)}[(Ut=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let t=[],n=[],r=this.iterator(),i=e=>({next:()=>{if(e.length===0){let e=r.next();t.push(e),n.push(e)}return e.shift()}});return[new e(()=>i(t),this.controller,g(this,Ut,`f`)),new e(()=>i(n),this.controller,g(this,Ut,`f`))]}toReadableStream(){let e=this,t;return mt({async start(){t=e[Symbol.asyncIterator]()},async pull(e){try{let{value:n,done:r}=await t.next();if(r)return e.close();let i=wt(JSON.stringify(n)+`
4
4
  `);e.enqueue(i)}catch(t){e.error(t)}},async cancel(){await t.return?.()}})}},Gt=class{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){if(e.endsWith(`\r`)&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;let e={event:this.event,data:this.data.join(`
@@ -36,4 +36,4 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
36
36
  `),r=n[0]??e.message,i=n.slice(1).filter(e=>e.trim().startsWith(`at `));return i.length<=t?e.stack:[r,...i.slice(0,t)].join(`
37
37
  `)}function ea(e){let t=Xi(e);return t===`ENOENT`||t===`EACCES`||t===`EPERM`||t===`ENOTDIR`||t===`ELOOP`}var ta,na,ra,ia,aa,oa,sa=e((()=>{Gi(),s(),ta=class extends Error{constructor(e){super(e),this.name=this.constructor.name}},na=class extends Error{},ra=class extends Error{constructor(e){super(e),this.name=`AbortError`}},ia=class extends Error{constructor(e,t,n){super(e),c(this,`filePath`,void 0),c(this,`defaultConfig`,void 0),this.name=`ConfigParseError`,this.filePath=t,this.defaultConfig=n}},aa=class extends Error{constructor(e,t,n,r){super(`Shell command failed`),c(this,`stdout`,void 0),c(this,`stderr`,void 0),c(this,`code`,void 0),c(this,`interrupted`,void 0),this.stdout=e,this.stderr=t,this.code=n,this.interrupted=r,this.name=`ShellError`}},oa=class extends Error{constructor(e,t){super(e),c(this,`telemetryMessage`,void 0),this.name=`TelemetrySafeError`,this.telemetryMessage=t??e}}}));function ca(){return fa}function la(e,t,n){return $`JSON.stringify(${e})`,JSON.stringify(e,t,n)}function ua(e,t){return $`structuredClone(${e})`,structuredClone(e,t)}function da(e,t,n){if($`fs.writeFileSync(${e}, ${t})`,typeof n==`object`&&n&&`flush`in n&&n.flush===!0){let r=typeof n==`object`&&`encoding`in n?n.encoding:void 0,i=typeof n==`object`&&`mode`in n?n.mode:void 0,a;try{a=oe(e,`w`,i),se(a,t,{encoding:r??void 0}),ae(a)}finally{a!==void 0&&ie(a)}}else se(e,t,n)}var fa,$,pa,ma=e((()=>{l(),Ja(),(()=>{let e=process.env.WORKMATE_SLOW_OPERATION_THRESHOLD_MS;if(e!==void 0){let t=Number(e);if(!Number.isNaN(t)&&t>=0)return t}return 1/0})(),fa={[Symbol.dispose](){}},$=ca,pa=(e,t)=>($`JSON.parse(${e})`,t===void 0?JSON.parse(e):JSON.parse(e,t))}));function ha(){var e=typeof SuppressedError==`function`?SuppressedError:function(e,t){var n=Error();return n.name=`SuppressedError`,n.error=e,n.suppressed=t,n},t={},n=[];function r(e,t){if(t!=null){if(Object(t)!==t)throw TypeError(`using declarations can only be used with objects, functions, null, or undefined.`);if(e)var r=t[Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`)];if(r===void 0&&(r=t[Symbol.dispose||Symbol.for(`Symbol.dispose`)],e))var i=r;if(typeof r!=`function`)throw TypeError(`Object is not disposable.`);i&&(r=function(){try{i.call(t)}catch(e){return Promise.reject(e)}}),n.push({v:t,d:r,a:e})}else e&&n.push({d:t,a:e});return t}return{e:t,u:r.bind(null,!1),a:r.bind(null,!0),d:function(){var r,i=this.e,a=0;function o(){for(;r=n.pop();)try{if(!r.a&&a===1)return a=0,n.push(r),Promise.resolve().then(o);if(r.d){var e=r.d.call(r.v);if(r.a)return a|=2,Promise.resolve(e).then(o,s)}else a|=1}catch(e){return s(e)}if(a===1)return i===t?Promise.resolve():Promise.reject(i);if(i!==t)throw i}function s(n){return i=i===t?n:new e(n,i),o()}return o()}}}var ga=e((()=>{}));function _a(e,t){if(t.startsWith(`//`)||t.startsWith(`\\\\`))return{resolvedPath:t,isSymlink:!1,isCanonical:!1};try{let n=e.lstatSync(t);if(n.isFIFO()||n.isSocket()||n.isCharacterDevice()||n.isBlockDevice())return{resolvedPath:t,isSymlink:!1,isCanonical:!1};let r=e.realpathSync(t);return{resolvedPath:r,isSymlink:r!==t,isCanonical:!0}}catch{return{resolvedPath:t,isSymlink:!1,isCanonical:!1}}}function va(e,t,n){let{resolvedPath:r}=_a(e,t);return n.has(r)?!0:(n.add(r),!1)}function ya(e,t){let n=t,r=[];for(;n!==p.dirname(n);){let t;try{t=e.lstatSync(n)}catch{r.unshift(p.basename(n)),n=p.dirname(n);continue}if(t.isSymbolicLink())try{let t=e.realpathSync(n);return r.length===0?t:p.join(t,...r)}catch{let t=e.readlinkSync(n),i=p.isAbsolute(t)?t:p.resolve(p.dirname(n),t);return r.length===0?i:p.join(i,...r)}try{let t=e.realpathSync(n);if(t!==n)return r.length===0?t:p.join(t,...r)}catch{}return}}function ba(e){let t=e;t===`~`?t=f().normalize(`NFC`):t.startsWith(`~/`)&&(t=p.join(f().normalize(`NFC`),t.slice(2)));let n=new Set,r=xa();if(n.add(t),t.startsWith(`//`)||t.startsWith(`\\\\`))return Array.from(n);try{let e=t,i=new Set;for(let a=0;a<40&&!i.has(e);a++){if(i.add(e),!r.existsSync(e)){if(e===t){let e=ya(r,t);e!==void 0&&n.add(e)}break}let a=r.lstatSync(e);if(a.isFIFO()||a.isSocket()||a.isCharacterDevice()||a.isBlockDevice()||!a.isSymbolicLink())break;let o=r.readlinkSync(e),s=p.isAbsolute(o)?o:p.resolve(p.dirname(e),o);n.add(s),e=s}}catch{}let{resolvedPath:i,isSymlink:a}=_a(r,t);return a&&i!==t&&n.add(i),Array.from(n)}function xa(){return Ea}async function Sa(e,t,n){try{var r=ha();let i=r.a(await ue(e,`r`)),a=(await i.stat()).size;if(a<=t)return null;let o=Math.min(a-t,n),s=Buffer.allocUnsafe(o),c=0;for(;c<o;){let{bytesRead:e}=await i.read(s,c,o-c,t+c);if(e===0)break;c+=e}return{content:s.toString(`utf8`,0,c),bytesRead:c,bytesTotal:a}}catch(e){r.e=e}finally{await r.d()}}async function Ca(e,t){try{var n=ha();let r=n.a(await ue(e,`r`)),i=(await r.stat()).size;if(i===0)return{content:``,bytesRead:0,bytesTotal:0};let a=Math.max(0,i-t),o=i-a,s=Buffer.allocUnsafe(o),c=0;for(;c<o;){let{bytesRead:e}=await r.read(s,c,o-c,a+c);if(e===0)break;c+=e}return{content:s.toString(`utf8`,0,c),bytesRead:c,bytesTotal:i}}catch(e){n.e=e}finally{await n.d()}}async function*wa(e){let t=1024*4,n=await ue(e,`r`);try{let e=(await n.stat()).size,r=Buffer.alloc(0),i=Buffer.alloc(t);for(;e>0;){let a=Math.min(t,e);e-=a,await n.read(i,0,a,e);let o=Buffer.concat([i.subarray(0,a),r]),s=o.indexOf(10);if(s===-1){r=o;continue}r=Buffer.from(o.subarray(0,s));let c=o.toString(`utf8`,s+1).split(`
38
38
  `);for(let e=c.length-1;e>=0;e--){let t=c[e];t&&(yield t)}}r.length>0&&(yield r.toString(`utf8`))}finally{await n.close()}}var Ta,Ea,Da=e((()=>{sa(),ma(),ga(),Ta={cwd(){return process.cwd()},existsSync(e){return $`fs.existsSync(${e})`,m.existsSync(e)},async stat(e){return ge(e)},async readdir(e){return fe(e,{withFileTypes:!0})},async unlink(e){return ve(e)},async rmdir(e){return he(e)},async rm(e,t){return me(e,t)},async mkdir(e,t){try{await le(e,{recursive:!0,...t})}catch(e){if(Xi(e)!==`EEXIST`)throw e}},async readFile(e,t){return de(e,{encoding:t.encoding})},async rename(e,t){return pe(e,t)},statSync(e){return $`fs.statSync(${e})`,m.statSync(e)},lstatSync(e){return $`fs.lstatSync(${e})`,m.lstatSync(e)},readFileSync(e,t){return $`fs.readFileSync(${e})`,m.readFileSync(e,{encoding:t.encoding})},readFileBytesSync(e){return $`fs.readFileBytesSync(${e})`,m.readFileSync(e)},readSync(e,t){$`fs.readSync(${e}, ${t.length} bytes)`;let n;try{n=m.openSync(e,`r`);let r=Buffer.alloc(t.length);return{buffer:r,bytesRead:m.readSync(n,r,0,t.length,0)}}finally{n&&m.closeSync(n)}},appendFileSync(e,t,n){if($`fs.appendFileSync(${e}, ${t.length} chars)`,n?.mode!==void 0)try{let r=m.openSync(e,`ax`,n.mode);try{m.appendFileSync(r,t)}finally{m.closeSync(r)}return}catch(e){if(Xi(e)!==`EEXIST`)throw e}m.appendFileSync(e,t)},copyFileSync(e,t){$`fs.copyFileSync(${e} → ${t})`,m.copyFileSync(e,t)},unlinkSync(e){$`fs.unlinkSync(${e})`,m.unlinkSync(e)},renameSync(e,t){$`fs.renameSync(${e} → ${t})`,m.renameSync(e,t)},linkSync(e,t){$`fs.linkSync(${e} → ${t})`,m.linkSync(e,t)},symlinkSync(e,t,n){$`fs.symlinkSync(${e} → ${t})`,m.symlinkSync(e,t,n)},readlinkSync(e){return $`fs.readlinkSync(${e})`,m.readlinkSync(e)},realpathSync(e){return $`fs.realpathSync(${e})`,m.realpathSync(e).normalize(`NFC`)},mkdirSync(e,t){$`fs.mkdirSync(${e})`;let n={recursive:!0};t?.mode!==void 0&&(n.mode=t.mode);try{m.mkdirSync(e,n)}catch(e){if(Xi(e)!==`EEXIST`)throw e}},readdirSync(e){return $`fs.readdirSync(${e})`,m.readdirSync(e,{withFileTypes:!0})},readdirStringSync(e){return $`fs.readdirStringSync(${e})`,m.readdirSync(e)},isDirEmptySync(e){return $`fs.isDirEmptySync(${e})`,this.readdirSync(e).length===0},rmdirSync(e){$`fs.rmdirSync(${e})`,m.rmdirSync(e)},rmSync(e,t){$`fs.rmSync(${e})`,m.rmSync(e,t)},createWriteStream(e){return m.createWriteStream(e)},async readFileBytes(e,t){if(t===void 0)return de(e);let n=await ue(e,`r`);try{let{size:e}=await n.stat(),r=Math.min(e,t),i=Buffer.allocUnsafe(r),a=0;for(;a<r;){let{bytesRead:e}=await n.read(i,a,r-a,a);if(e===0)break;a+=e}return a<r?i.subarray(0,a):i}finally{await n.close()}}},Ea=Ta})),Oa=t({getDebugLogPath:()=>Ia,getHasFormattedOutput:()=>ja,isDebugMode:()=>Ba,isDebugToStdErr:()=>Ha,logAntError:()=>La,logForDebugging:()=>Fa,setHasFormattedOutput:()=>Aa});function ka(e){return!Ba()||typeof process>`u`||process.versions===void 0||process.versions.node===void 0?!1:De(e,Va())}function Aa(e){Wa=e}function ja(){return Wa}async function Ma(e,t,n,r){e&&await le(t,{recursive:!0}).catch(()=>{}),await ce(n,r),qa()}function Na(){}function Pa(){if(!Ga){let e=null;Ga=ye({writeFn:t=>{let n=Ia(),r=te(n),i=e!==r;if(e=r,Ba()){if(i)try{xa().mkdirSync(r)}catch{}try{xa().appendFileSync(n,t)}catch{try{xa().mkdirSync(r),xa().appendFileSync(n,t)}catch{}}qa();return}Ka=Ka.then(Ma.bind(null,i,r,n,t)).catch(Na)},flushIntervalMs:1e3,maxBufferSize:100,immediateMode:Ba()}),xe(async()=>{Ga?.dispose(),await Ka})}return Ga}function Fa(e,{level:t}={level:`debug`}){if(Ra[t]<Ra[za()]||!ka(e))return;Wa&&e.includes(`
39
- `)&&(e=la(e));let n=`${new Date().toISOString()} [${t.toUpperCase()}] ${e.trim()}\n`;if(Ha()){ee(n);return}Pa().write(n)}function Ia(){return Ua()??(process.env.WORKMATE_DEBUG_LOGS_DIR?re(process.env.WORKMATE_DEBUG_LOGS_DIR):null)??ne(i(),`debug`,`${u()}.txt`)}function La(e,t){t instanceof Error&&t.stack&&Fa(`[ANT-ONLY] ${e} stack trace:\n${t.stack}`,{level:`error`})}var Ra,za,Ba,Va,Ha,Ua,Wa,Ga,Ka,qa,Ja=e((()=>{r(),l(),be(),we(),ke(),o(),Da(),d(),ma(),Ra={verbose:0,debug:1,info:2,warn:3,error:4},za=n(()=>{let e=process.env.WORKMATE_DEBUG_LOG_LEVEL?.toLowerCase().trim();return e&&Object.hasOwn(Ra,e)?e:`debug`}),Ba=n(()=>a(process.env.DEBUG)||a(process.env.DEBUG_SDK)||process.argv.includes(`--debug`)||process.argv.includes(`-d`)||Ha()||process.argv.some(e=>e.startsWith(`--debug=`))||Ua()!==null),Va=n(()=>{let e=process.argv.find(e=>e.startsWith(`--debug=`));return e?Oe(e.substring(8)):null}),Ha=n(()=>process.argv.includes(`--debug-to-stderr`)),Ua=n(()=>{for(let e=0;e<process.argv.length;e++){let t=process.argv[e];if(t.startsWith(`--debug-file=`))return re(t.substring(13));if(t===`--debug-file`&&e+1<process.argv.length)return re(process.argv[e+1])}return null}),Wa=!1,Ga=null,Ka=Promise.resolve(),qa=n(async()=>{try{let e=Ia(),t=ne(te(e),`latest`);await ve(t).catch(()=>{}),await _e(e,t)}catch{}})}));export{we as $,aa as A,$i as B,la as C,ta as D,ra as E,qi as F,F as G,Gi as H,sa as I,y as J,Fe as K,Ki as L,Yi as M,Xi as N,ia as O,Qi as P,x as Q,Zi as R,pa as S,da as T,Ui as U,Ji as V,Wi as W,Re as X,b as Y,Be as Z,Ca as _,Ba as a,ua as b,Fa as c,ba as d,xe as et,Da as f,_a as g,wa as h,Ja as i,oa as j,na as k,Aa as l,Sa as m,Ia as n,ye as nt,Ha as o,va as p,Ie as q,ja as r,be as rt,La as s,Oa as t,Se as tt,xa as u,ha as v,$ as w,ma as x,ga as y,ea as z};
39
+ `)&&(e=la(e));let n=`${new Date().toISOString()} [${t.toUpperCase()}] ${e.trim()}\n`;if(Ha()){d(n);return}Pa().write(n)}function Ia(){return Ua()??(process.env.WORKMATE_DEBUG_LOGS_DIR?re(process.env.WORKMATE_DEBUG_LOGS_DIR):null)??ne(i(),`debug`,`${u()}.txt`)}function La(e,t){t instanceof Error&&t.stack&&Fa(`[ANT-ONLY] ${e} stack trace:\n${t.stack}`,{level:`error`})}var Ra,za,Ba,Va,Ha,Ua,Wa,Ga,Ka,qa,Ja=e((()=>{r(),l(),be(),we(),ke(),o(),Da(),ee(),ma(),Ra={verbose:0,debug:1,info:2,warn:3,error:4},za=n(()=>{let e=process.env.WORKMATE_DEBUG_LOG_LEVEL?.toLowerCase().trim();return e&&Object.hasOwn(Ra,e)?e:`debug`}),Ba=n(()=>a(process.env.DEBUG)||a(process.env.DEBUG_SDK)||process.argv.includes(`--debug`)||process.argv.includes(`-d`)||Ha()||process.argv.some(e=>e.startsWith(`--debug=`))||Ua()!==null),Va=n(()=>{let e=process.argv.find(e=>e.startsWith(`--debug=`));return e?Oe(e.substring(8)):null}),Ha=n(()=>process.argv.includes(`--debug-to-stderr`)),Ua=n(()=>{for(let e=0;e<process.argv.length;e++){let t=process.argv[e];if(t.startsWith(`--debug-file=`))return re(t.substring(13));if(t===`--debug-file`&&e+1<process.argv.length)return re(process.argv[e+1])}return null}),Wa=!1,Ga=null,Ka=Promise.resolve(),qa=n(async()=>{try{let e=Ia(),t=ne(te(e),`latest`);await ve(t).catch(()=>{}),await _e(e,t)}catch{}})}));export{we as $,aa as A,$i as B,la as C,ta as D,ra as E,qi as F,F as G,Gi as H,sa as I,y as J,Fe as K,Ki as L,Yi as M,Xi as N,ia as O,Qi as P,x as Q,Zi as R,pa as S,da as T,Ui as U,Ji as V,Wi as W,Re as X,b as Y,Be as Z,Ca as _,Ba as a,ua as b,Fa as c,ba as d,xe as et,Da as f,_a as g,wa as h,Ja as i,oa as j,na as k,Aa as l,Sa as m,Ia as n,ye as nt,Ha as o,va as p,Ie as q,ja as r,be as rt,La as s,Oa as t,Se as tt,xa as u,ha as v,$ as w,ma as x,ga as y,ea as z};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Wr as t,qr as n}from"./settings-D4M13toi.js";import{n as r,t as i}from"./cwd-DrEEb4f5.js";import{c as a,i as o}from"./debug-2pVES-2G.js";function s(){f.clear()}async function c(){let e=await l();return!e||e.host!==`github.com`?null:`${e.owner}/${e.name}`}async function l(){let e=i();if(f.has(e))return f.get(e)??null;try{let n=await t();if(a(`Git remote URL: ${n}`),!n)return a(`没找到 git remote URL`),f.set(e,null),null;let r=u(n);return a(`Parsed repository: ${r?`${r.host}/${r.owner}/${r.name}`:null} from URL: ${n}`),f.set(e,r),r}catch(t){return a(`Error detecting repository: ${t}`),f.set(e,null),null}}function u(e){let t=e.trim(),n=t.match(/^git@([^:]+):([^/]+)\/([^/]+?)(?:\.git)?$/);if(n?.[1]&&n[2]&&n[3])return d(n[1])?{host:n[1],owner:n[2],name:n[3]}:null;let r=t.match(/^(https?|ssh|git):\/\/(?:[^@]+@)?([^/:]+(?::\d+)?)\/([^/]+)\/([^/]+?)(?:\.git)?$/);if(r?.[1]&&r[2]&&r[3]&&r[4]){let e=r[1],t=r[2],n=t.split(`:`)[0]??``;return d(n)?{host:e===`https`||e===`http`?t:n,owner:r[3],name:r[4]}:null}return null}function d(e){if(!e.includes(`.`))return!1;let t=e.split(`.`).pop();return t?/^[a-zA-Z]+$/.test(t):!1}var f,p=e((()=>{r(),o(),n(),f=new Map}));export{c as n,p as r,s as t};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Gr as t,Jr as n}from"./settings-CA-5Px85.js";import{n as r,t as i}from"./cwd-DrEEb4f5.js";import{c as a,i as o}from"./debug-NBJH_NxR.js";function s(){f.clear()}async function c(){let e=await l();return!e||e.host!==`github.com`?null:`${e.owner}/${e.name}`}async function l(){let e=i();if(f.has(e))return f.get(e)??null;try{let n=await t();if(a(`Git remote URL: ${n}`),!n)return a(`没找到 git remote URL`),f.set(e,null),null;let r=u(n);return a(`Parsed repository: ${r?`${r.host}/${r.owner}/${r.name}`:null} from URL: ${n}`),f.set(e,r),r}catch(t){return a(`Error detecting repository: ${t}`),f.set(e,null),null}}function u(e){let t=e.trim(),n=t.match(/^git@([^:]+):([^/]+)\/([^/]+?)(?:\.git)?$/);if(n?.[1]&&n[2]&&n[3])return d(n[1])?{host:n[1],owner:n[2],name:n[3]}:null;let r=t.match(/^(https?|ssh|git):\/\/(?:[^@]+@)?([^/:]+(?::\d+)?)\/([^/]+)\/([^/]+?)(?:\.git)?$/);if(r?.[1]&&r[2]&&r[3]&&r[4]){let e=r[1],t=r[2],n=t.split(`:`)[0]??``;return d(n)?{host:e===`https`||e===`http`?t:n,owner:r[3],name:r[4]}:null}return null}function d(e){if(!e.includes(`.`))return!1;let t=e.split(`.`).pop();return t?/^[a-zA-Z]+$/.test(t):!1}var f,p=e((()=>{r(),o(),n(),f=new Map}));export{c as n,p as r,s as t};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{t}from"./jsx-runtime-Bb4Xn-E0.js";var n,r;e((()=>{n=t(),r=async(e,t)=>{let{DiffDialog:r}=await import(`./DiffDialog-CXZxnb7Y.js`);return(0,n.jsx)(r,{messages:t.messages,onDone:e})}}))();export{r as call};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{t}from"./jsx-runtime-Bb4Xn-E0.js";var n,r;e((()=>{n=t(),r=async(e,t)=>{let{DiffDialog:r}=await import(`./DiffDialog-DSb46fzB.js`);return(0,n.jsx)(r,{messages:t.messages,onDone:e})}}))();export{r as call};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{$r as t,Qr as n,dr as r,pr as i}from"./settings-D4M13toi.js";import{n as a,t as o}from"./cwd-DrEEb4f5.js";import{f as s,u as c}from"./debug-2pVES-2G.js";import{o as l,s as u}from"./log-L1kqxa_P.js";import{basename as d,dirname as f,join as p,sep as m}from"path";function h(e,t){if(!e)return{directory:t||o(),prefix:``};let n=r(e,t);return e.endsWith(`/`)||e.endsWith(m)?{directory:n,prefix:``}:{directory:f(n),prefix:d(e)}}async function g(e){let t=C.get(e);if(t)return t;try{let t=(await c().readdir(e)).filter(e=>e.isDirectory()&&!e.name.startsWith(`.`)).map(t=>({name:t.name,path:p(e,t.name),type:`directory`})).slice(0,100);return C.set(e,t),t}catch(e){return u(e),[]}}async function _(e,t={}){let{basePath:n=o(),maxResults:r=10}=t,{directory:i,prefix:a}=h(e,n),s=await g(i),c=a.toLowerCase();return s.filter(e=>e.name.toLowerCase().startsWith(c)).slice(0,r).map(e=>({id:e.path,displayText:`${e.name}/`,description:`directory`,metadata:{type:`directory`}}))}function v(e){return e.startsWith(`~/`)||e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`)||e===`~`||e===`.`||e===`..`}async function y(e,t=!1){let n=`${e}:${t}`,r=w.get(n);if(r)return r;try{let r=(await c().readdir(e)).filter(e=>t||!e.name.startsWith(`.`)).map(t=>({name:t.name,path:p(e,t.name),type:t.isDirectory()?`directory`:`file`})).sort((e,t)=>e.type===`directory`&&t.type!==`directory`?-1:e.type!==`directory`&&t.type===`directory`?1:e.name.localeCompare(t.name)).slice(0,100);return w.set(n,r),r}catch(e){return u(e),[]}}async function b(e,t={}){let{basePath:n=o(),maxResults:r=10,includeFiles:i=!0,includeHidden:a=!1}=t,{directory:s,prefix:c}=h(e,n),l=await y(s,a),u=c.toLowerCase(),d=l.filter(e=>!i&&e.type===`file`?!1:e.name.toLowerCase().startsWith(u)).slice(0,r),f=e.includes(`/`)||e.includes(m),p=``;if(f){let t=e.lastIndexOf(`/`),n=e.lastIndexOf(m),r=Math.max(t,n);p=e.substring(0,r+1)}return(p.startsWith(`./`)||p.startsWith(`.${m}`))&&(p=p.slice(2)),d.map(e=>{let t=p+e.name;return{id:t,displayText:e.type===`directory`?`${t}/`:t,metadata:{type:e.type}}})}var x,S,C,w,T=e((()=>{t(),a(),s(),l(),i(),x=500,S=300*1e3,C=new n({max:x,ttl:S}),w=new n({max:x,ttl:S})}));export{v as i,b as n,T as r,_ as t};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{$r as t,dr as n,ei as r,pr as i}from"./settings-CA-5Px85.js";import{n as a,t as o}from"./cwd-DrEEb4f5.js";import{f as s,u as c}from"./debug-NBJH_NxR.js";import{o as l,s as u}from"./log-D98mO6yJ.js";import{basename as d,dirname as f,join as p,sep as m}from"path";function h(e,t){if(!e)return{directory:t||o(),prefix:``};let r=n(e,t);return e.endsWith(`/`)||e.endsWith(m)?{directory:r,prefix:``}:{directory:f(r),prefix:d(e)}}async function g(e){let t=C.get(e);if(t)return t;try{let t=(await c().readdir(e)).filter(e=>e.isDirectory()&&!e.name.startsWith(`.`)).map(t=>({name:t.name,path:p(e,t.name),type:`directory`})).slice(0,100);return C.set(e,t),t}catch(e){return u(e),[]}}async function _(e,t={}){let{basePath:n=o(),maxResults:r=10}=t,{directory:i,prefix:a}=h(e,n),s=await g(i),c=a.toLowerCase();return s.filter(e=>e.name.toLowerCase().startsWith(c)).slice(0,r).map(e=>({id:e.path,displayText:`${e.name}/`,description:`directory`,metadata:{type:`directory`}}))}function v(e){return e.startsWith(`~/`)||e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`)||e===`~`||e===`.`||e===`..`}async function y(e,t=!1){let n=`${e}:${t}`,r=w.get(n);if(r)return r;try{let r=(await c().readdir(e)).filter(e=>t||!e.name.startsWith(`.`)).map(t=>({name:t.name,path:p(e,t.name),type:t.isDirectory()?`directory`:`file`})).sort((e,t)=>e.type===`directory`&&t.type!==`directory`?-1:e.type!==`directory`&&t.type===`directory`?1:e.name.localeCompare(t.name)).slice(0,100);return w.set(n,r),r}catch(e){return u(e),[]}}async function b(e,t={}){let{basePath:n=o(),maxResults:r=10,includeFiles:i=!0,includeHidden:a=!1}=t,{directory:s,prefix:c}=h(e,n),l=await y(s,a),u=c.toLowerCase(),d=l.filter(e=>!i&&e.type===`file`?!1:e.name.toLowerCase().startsWith(u)).slice(0,r),f=e.includes(`/`)||e.includes(m),p=``;if(f){let t=e.lastIndexOf(`/`),n=e.lastIndexOf(m),r=Math.max(t,n);p=e.substring(0,r+1)}return(p.startsWith(`./`)||p.startsWith(`.${m}`))&&(p=p.slice(2)),d.map(e=>{let t=p+e.name;return{id:t,displayText:e.type===`directory`?`${t}/`:t,metadata:{type:e.type}}})}var x,S,C,w,T=e((()=>{r(),a(),s(),l(),i(),x=500,S=300*1e3,C=new t({max:x,ttl:S}),w=new t({max:x,ttl:S})}));export{v as i,b as n,T as r,_ as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{t}from"./jsx-runtime-Bb4Xn-E0.js";import{n,t as r}from"./Doctor-dR71Dg_D.js";var i,a;e((()=>{n(),i=t(),a=(e,t,n)=>Promise.resolve((0,i.jsx)(r,{onDone:e}))}))();export{a as call};