module.exports=[480202,a=>{"use strict";var b=a.i(912513),c=a.i(889253),d=a.i(723504),e=a.i(408115),f=a.i(827900),g=a.i(673350),h=a.i(673101),i=a.i(654775),j=a.i(265324),k=a.i(659127),l=a.i(996380),m=a.i(618400),n=a.i(140848);async function o(a){try{(0,n.requireFeatureFlag)("collaboration");let b=(0,l.resolve)("CreateCustomAgentUseCase"),c=a.initialPromptId?.trim()&&a.initialPromptBody?.length?{promptId:a.initialPromptId.trim(),body:a.initialPromptBody}:void 0,d=await b.execute({agentType:a.agentType,name:a.name,description:a.description,...void 0!==c&&{initialPrompt:c}});return(0,m.revalidatePath)("/agents"),(0,m.revalidatePath)(`/agents/${d.agent.agentType}`),{ok:!0,agentType:d.agent.agentType}}catch(a){return{ok:!1,error:a instanceof Error?a.message:"Failed to create agent"}}}async function p(a){try{(0,n.requireFeatureFlag)("collaboration");let b=(0,l.resolve)("DeleteCustomAgentUseCase");return await b.execute(a),(0,m.revalidatePath)("/agents"),{ok:!0}}catch(a){return{ok:!1,error:a instanceof Error?a.message:"Failed to delete agent"}}}(0,a.i(501905).ensureServerEntryExports)([o,p]),(0,k.registerServerReference)(o,"40360b3feab6c77ec36a587c7cdce9708ed5168fc5",null),(0,k.registerServerReference)(p,"40f327b58e384c3fbd023f324609f6dc9028a30b8a",null),a.s([],919338),a.i(919338),a.s(["00173dba11983ca8bc5eee5202809f1608ecb7b9ee",()=>i.listGitHubOrganizations,"00218fdba1289cf3a0703970456df81e7c2ce879da",()=>b.pickFolder,"003fe82fb16e38877fe4c96020b914dbf66345c10c",()=>d.getAllAgentModels,"0064c6a904ca8939b26e1d7cb971dfe1ce0a736d92",()=>c.getDefaultAgentAndModel,"00a388dfcc45f45365055fb2f8fbd6f5b260c29752",()=>e.checkAllAgentsStatus,"40085450b3d987b1b69c38f877433761c8cee07382",()=>g.globalSearch,"400b2f183f80480ccf6ce3de92037e85218f7dd8b3",()=>h.listGitHubRepositories,"40360b3feab6c77ec36a587c7cdce9708ed5168fc5",0,o,"40834634ae55a0b7479981f9f0629fde71c59e080b",()=>j.importGitHubRepository,"60819c777e2e4ccac54bf78640d89e08f9c04abfd4",()=>f.updateAgentAndModel],480202)}];

//# sourceMappingURL=src_presentation_web__next-internal_server_app_agents_page_actions_0_l-e2k.js.map