PageSourceSearch

https://www.dopamine.chat/assets/AgentSummary-e67d7cf0.js

js dopamine.chat collected 2026-10-04 22:56:27 UTC 21,008 bytes, 1 lines download raw bytes

1import{j as e,m as t}from"./animations-a08511ae.js";import{r as s}from"./vendor-c33d591b.js";import{agentsApi as r,toolsApi as a}from"./api-8ec1f310.js";import{t as i,i as n,A as l,W as o}from"./WhatsappVerificationDialog-6ce4420a.js";import{u as m}from"./useIntegrationPolling-8bfe5c92.js";import{L as c}from"./LottieAnimation-11c3dc44.js";import{C as d}from"./CelebrationAnimation-536f016e.js";import{A as p}from"./AgentAvatar-654fa97f.js";import{g as x,a as u}from"./toolIcons-3eae1540.js";import{t as g,g as h}from"./integrationMapping-c655e1bc.js";import{g as y}from"./triggerMetadata-2c54b56c.js";import{g as f,a as j}from"./integrationIcons-181f7c84.js";import{U as b}from"./UpgradeToProDialog-39cac648.js";import{w as N}from"./whatsappGroupsService-a97dbd4e.js";import{c as v,u as w}from"./router-05d3fb21.js";import{C as _}from"./check-circle-345b4c39.js";import{Z as A}from"./zap-2fe53298.js";import{L as S}from"./link-a970e804.js";import{F as k}from"./file-text-1f965873.js";import{C}from"./calendar-ecb97129.js";import{C as $}from"./clock-69363cca.js";import{M as T}from"./mail-da59df69.js";import{A as I}from"./arrow-right-8a91b400.js";import{H as W}from"./home-fcb173a0.js";import"./index-b20fcc35.js";import"./utils-c82328de.js";import"./Tooltip-ab6f6c6d.js";import"./key-39c818c7.js";import"./sparkles-6814ea84.js";import"./help-circle-263d443e.js";import"./check-e16f8e7b.js";import"./star-a369d3a9.js";import"./bot-284f5b58.js";import"./globe-6f4fe45a.js";
1import"./trending-up-0eb626e9.js";import"./search-8e050b0d.js";import"./composioTriggersApi-bf92d64f.js";function E(){const{agentId:E}=v(),P=w(),[O,M]=s.useState(null),[D,K]=s.useState([]),[U,L]=s.useState([]),[z,F]=s.useState([]),[G,H]=s.useState([]),[V,R]=s.useState(!0),[B,J]=s.useState(""),[q,Y]=s.useState(!0),[Z,Q]=s.useState(null),[X,ee]=s.useState({isOpen:!1,toolType:null,integrationType:null,integrationName:null,apiKey:""}),[te,se]=s.useState({}),[re,ae]=s.useState(!1),[ie,ne]=s.useState({isOpen:!1,feature:null}),[le,oe]=s.useState({}),{startPolling:me,stopPolling:ce}=m({enabled:null!==Z,onStatusUpdate:e=>{if(H(e),Z){e.find(e=>e.integration_type===Z&&"active"===e.status)&&(Q(null),ce())}},onError:e=>{},intervalMs:3e3,maxAttempts:10});s.useEffect(()=>{E&&de()},[E]),s.useEffect(()=>{if(!V&&q){const e=setTimeout(()=>{Y(!1)},3e3);return()=>clearTimeout(e)}},[V,q]);const de=async()=>{try{if(!E)return;const[e,t,s,l,o]=await Promise.all([r.getById(E),a.getAvailableTools(),r.getAgentFiles(E).catch(()=>[]),i.getAgentTriggers(E).catch(()=>[]),n.getStatus().catch(()=>({integrations:[]}))]);M(e),K(t),L(s),F(l),H(o.integrations),await(async e=>{const t={};for(const r of e)if("cron"!==r.trigger_type)try{const e=await y(r.trigger_type);t[r.trigger_type]=e}catch(s){t[r.trigger_type]=r.trigger_type.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}se(t)})(l),await(async e=>{const t=e.filter(e=>"whatsapp"===e.output?.output_type);if(0===t.length)return;const s={};try{const e=await N.getVerifiedGroups();let a=null;try{a=(await i.getWhatsappVerificationStatus()).phone_number||null}catch(r){}for(const r of t){const t=r.output?.output_whatsapp_group_chat_id;if(t){const a=e.find(e=>e.group_chat_id===t);s[r.trigger_id]={phoneNumber:null,groupName:a?.group_name||t}}else s[r.trigger_id]={phoneNumber:a,groupName:null}}oe(s)}catch(r){}})(l)}catch(e){J(e instanceof Error?e.message:"Failed to load agent")}finally{R(!1)}},pe=e=>D.find(t=>t.tool_type===e),xe=e=>{const t=(e=>{const t=h(e);return t?G.find(e=>e.integration_type===t):null})(e);return"active"===t?.status},ue=async(e,t)=>{const s=h(e);if(s)try{if("whatsapp_green"===s)return void ae(!0);const r=D.find(t=>t.tool_type===e);if("api_key"===r?.auth_type&&!t)return void ee({isOpen:!0,toolType:e,integrationType:s,integrationName:r.name||s,apiKey:""});Q(s),E&&sessionStorage.setItem("lastAgentSummaryId",E);const a=window.location.origin,i=await n.initiate({integration_type:s,domain:a,callback_route:"/integrations/callback",api_key:t});if("api_key"===r?.auth_type){if("ACTIVE"===i.status||"connected"===i.status){const e=await n.getStatus();H(e.integrations)}else alert(`Failed to connect ${s}. Please check your API key.`);return void Q(null)}if(!i.redirect_url)return alert("No redirect URL received. Please try again."),void Q(null);const l=window.open(i.redirect_url,"oauth_auth","width=600,height=700,scrollbars=yes,resizable=yes");if(!l)return alert("Popup was blocked. Please allow popups for this site."),void Q(null);me();const o=setInterval(()=>{l.closed&&clearInterval(o)},1e3)}catch(r){Q(null)}},ge=e=>{const t=e.split(".").pop()?.toLowerCase();switch(t){case"pdf":return"📄";case"doc":case"docx":return"📝";case"txt":return"📃";case"xls":case"xlsx":return"📊";case"ppt":case"pptx":return"📽️";case"jpg":case"jpeg":case"png":case"gif":return"🖼️";case"mp4":case"avi":case"mov":return"🎥";case"mp3":case"wav":return"🎵";case"zip":case"rar":return"📦";default:return"📁"}},he=e=>{try{const t=e.trim().split(/\s+/);if(5!==t.length)return e;const[s,r,a,i,n]=t,l=(e,t)=>{const s=parseInt(e),r=parseInt(t),a=new Date;a.setUTCHours(s,r,0,0);const i=a.getHours(),n=i>=12?"PM":"AM";return`${0===i?12:i>12?i-12:i}:${a.getMinutes().toString().padStart(2,"0")} ${n}`},o=e=>{const t=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];if("*"===e)return"every day";if(e.includes(",")){return e.split(",").map(e=>t[parseInt(e.trim())]).join(", ")}if(e.includes("-")){const[s,r]=e.split("-").map(e=>parseInt(e.trim())),a=[];for(let e=s;e<=r;e++)a.push(t[e]);return a.join(", ")}return t[parseInt(e)]},m=e=>{const t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];if("*"===e)return"";if(e.includes(",")){return` in ${e.split(",").map(e=>t[parseInt(e.trim())-1]).join(", ")}`}if(e.includes("-")){const[s,r]=e.split("-").map(e=>parseInt(e.trim())),a=[];for(let e=s;e<=r;e++)a.push(t[e-1]);return` in ${a.join(", ")}`}return` in ${t[parseInt(e)-1]}`};if("*"===s&&"*"===r&&"*"===a&&"*"===i&&"*"===n)return"Every minute";if("*"!==s&&"*"===r&&"*"===a&&"*"===i&&"*"===n)return"0"===s?"Every hour":`Every hour at ${s} minutes past`;if("*"!==s&&r.startsWith("*/")&&"*"===a&&"*"===i&&"*"===n){const e=r.substring(2);return"0"===s?`Every ${e} hours`:`Every ${e} hours at ${s} minutes past`}if("*"!==s&&"*"!==r&&"*"===a&&"*"===i&&"*"===n)return`Daily at ${l(r,s)}`;if("*"!==s&&"*"!==r&&"*"===a&&"*"===i&&"*"!==n){const e=l(r,s);return`${o(n)} at ${e}`}if("*"!==s&&"*"!==r&&"*"!==a&&"*"===i&&"*"===n){const e=l(r,s),t=a;return`Monthly on the ${t}${t.endsWith("1")&&"11"!==t?"st":t.endsWith("2")&&"12"!==t?"nd":t.endsWith("3")&&"13"!==t?"rd":"th"} at ${e}`}if("*"!==s&&"*"!==r&&"*"!==a&&"*"!==i&&"*"===n){const e=l(r,s),t=a;return`${m(i)} on the ${t}${t.endsWith("1")&&"11"!==t?"st":t.endsWith("2")&&"12"!==t?"nd":t.endsWith("3")&&"13"!==t?"rd":"th"} at ${e}`}if(s.startsWith("*/")&&"*"===r&&"*"===a&&"*"===i&&"*"===n){return`Every ${s.substring(2)} minutes`}if("*"!==s&&"*"!==r&&a.startsWith("*/")&&"*"===i&&"*"===n){const e=a.substring(2);return`Every ${e} days at ${l(r,s)}`}return e}catch(t){return e}};return V?e.jsxs("div",{className:"min-h-screen relative overflow-hidden",children:[e.jsx("div",{className:"fixed inset-0 bg-gradient-to-br from-gray-900 via-purple-900/10 to-gray-900",children:e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_50%_50%,rgba(147,51,234,0.1),transparent_50%)]"})}),e.jsx("div",{className:"relative z-10 flex items-center justify-center min-h-screen",children:e.jsx(c,{text:"Loading agent summary...",size:"md"})})]}):B||!O?e.jsx("div",{className:"min-h-screen flex items-center justify-center px-1 sm:px-4",children:e.jsxs("div",{className:"bg-gray-900/95 rounded-lg sm:rounded-2xl border border-gray-800 p-3 sm:p-6 lg:p-8 shadow-2xl max-w-md w-full text-center",children:[e.jsx("div",{className:"text-red-400 mb-2 sm:mb-4",children:e.jsx(_,{className:"w-10 h-10 sm:w-16 sm:h-16 mx-auto"})}),e.jsx("h2",{className:"text-base sm:text-xl font-bold text-white mb-2 sm:mb-4",children:"Error Loading Agent"}),e.jsx("p",{className:"text-xs sm:text-base text-gray-400 mb-3 sm:mb-6",children:B||"Agent not found"}),e.jsx("button",{onClick:()=>P("/"),className:"bg-gradient-to-r from-purple-500 via-pink-500 to-yellow-500 hover:from-purple-600 hover:via-pink-600 hover:to-yellow-600 text-white px-3 sm:px-6 py-2 sm:py-3 rounded-lg sm:rounded-xl font-semibold transition-all duration-200 text-xs sm:text-base",children:"Back to Builder"})]})}):e.jsxs("div",{className:"min-h-screen relative overflow-hidden",children:[q&&e.jsx(d,{}),e.jsxs("div",{className:"fixed inset-0 bg-gradient-to-br from-gray-900 via-purple-900/10 to-gray-900",children:[e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_50%_50%,rgba(147,51,234,0.1),transparent_50%)]"}),e.jsx("div",{className:"absolute top-20 left-10 w-72 h-72 bg-purple-500/10 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute bottom-20 right-10 w-96 h-96 bg-pink-500/10 rounded-full blur-3xl"})]}),e.jsx("div",{className:"relative z-10 flex items-center justify-center min-h-screen px-1 sm:px-4",children:e.jsxs(t.div,{initial:{opacity:0,scale:.9}
1,animate:{opacity:1,scale:1},transition:{duration:.5,delay:.5},className:"bg-gray-900/95 backdrop-blur-sm rounded-xl sm:rounded-3xl border border-gray-800 p-3 sm:p-6 lg:p-8 shadow-2xl max-w-2xl w-full",children:[e.jsxs(t.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.7},className:"text-center mb-4 sm:mb-8",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-12 h-12 sm:w-20 sm:h-20 bg-gradient-to-r from-green-500 to-emerald-500 rounded-full mb-3 sm:mb-6",children:e.jsx(_,{className:"w-6 h-6 sm:w-10 sm:h-10 text-white"})}),e.jsx("h1",{className:"text-lg sm:text-3xl font-bold bg-gradient-to-r from-white via-gray-100 to-gray-300 bg-clip-text text-transparent mb-1.5 sm:mb-2",children:"Agent Created Successfully!"}),e.jsx("p",{className:"text-xs sm:text-base text-gray-400",children:"Your AI assistant is ready to help you"})]}),e.jsxs(t.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.9},className:"space-y-3 sm:space-y-6",children:[e.jsxs("div",{className:"flex items-center p-2.5 sm:p-4 bg-gray-800/50 rounded-lg sm:rounded-xl border border-gray-700",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx(p,{agent:O,size:"lg"})}),e.jsxs("div",{className:"ml-2.5 sm:ml-4",children:[e.jsx("h3",{className:"text-sm sm:text-lg font-semibold text-white",children:O.name||"AI Assistant"}),e.jsxs("p",{className:"text-gray-400 text-xs sm:text-sm",children:["Created ",new Date(O.created_at).toLocaleDateString()]})]})]}),O.tools&&O.tools.length>0&&e.jsxs("div",{className:"p-2.5 sm:p-4 bg-gray-800/50 rounded-lg sm:rounded-xl border border-gray-700",children:[e.jsxs("div",{className:"flex items-center mb-2.5 sm:mb-4",children:[e.jsx(A,{className:"w-3.5 h-3.5 sm:w-5 sm:h-5 text-yellow-500 mr-1.5 sm:mr-2"}),e.jsx("h3",{className:"text-sm sm:text-lg font-semibold text-white",children:"Capabilities"})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-1.5 sm:gap-3",children:[O.tools.slice(0,6).map((s,r)=>{const a=pe(s.tool_type),i=a?.tool_type||"",n=g(i),l=xe(i),o=Z===h(i);return e.jsxs(t.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3,delay:1.1+.1*r},className:"relative flex items-start p-1.5 sm:p-3 bg-gray-700/50 rounded-lg",children:[e.jsx("div",{className:`mr-1.5 sm:mr-2 flex-shrink-0 mt-0.5 ${x(i)}`,children:u(i,"w-2.5 h-2.5 sm:w-4 sm:h-4")}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-xs sm:text-sm font-medium text-gray-200 truncate",children:a?.name||s.tool_type.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}),a?.description&&e.jsx("div",{className:"text-xs text-gray-400 mt-0.5 sm:mt-1 line-clamp-2",children:a.description})]}),n&&!l&&e.jsx("div",{className:"absolute top-1 right-1 sm:top-1.5 sm:right-1.5",children:e.jsx("button",{onClick:()=>ue(i),disabled:o,className:"flex items-center gap-1 px-2 py-1 bg-blue-500/20 hover:bg-blue-500/30 border border-blue-500/30 hover:border-blue-500/50 rounded-full transition-all duration-200 group",title:`Connect your ${a?.name||i} account to use this tool`,children:o?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-2.5 h-2.5 border border-blue-400 border-t-transparent rounded-full animate-spin"}),e.jsx("span",{className:"text-xs text-blue-400 font-medium",children:"Connecting..."})]}):e.jsxs(e.Fragment,{children:[e.jsx(S,{className:"w-3 h-3 text-blue-400 group-hover:text-blue-300"}),e.jsx("span",{className:"text-xs text-blue-400 group-hover:text-blue-300 font-medium",children:"Connect"})]})})}),(!n||n&&l)&&e.jsx("div",{className:"absolute top-1 right-1 sm:top-1.5 sm:right-1.5",children:e.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-green-500/20 border border-green-500/30 rounded-full",children:[e.jsx(_,{className:"w-3 h-3 text-green-400"}),e.jsx("span",{className:"text-xs text-green-400 font-medium",children:"Connected"})]})})]},s.tool_type)}),O.tools.length>6&&e.jsxs("div",{className:"flex items-center p-1.5 sm:p-3 bg-gray-700/50 rounded-lg",children:[e.jsx("div",{className:"w-2.5 h-2.5 sm:w-4 sm:h-4 bg-gray-500 rounded-full mr-1.5 sm:mr-2 flex-shrink-0"}),e.jsxs("span",{className:"text-xs sm:text-sm text-gray-400",children:["+",O.tools.length-6," more tools"]})]})]})]}),O.tools&&O.tools.some(e=>{const t=pe(e.tool_type),s=t?.tool_type||"";return g(s)&&!xe(s)})&&e.jsx(t.div,{initial:{opacity:0,y:-10}
1,animate:{opacity:1,y:0},transition:{duration:.4,delay:1.3},className:"px-2.5 sm:px-4 py-2 bg-yellow-500/10 border border-yellow-500/30 rounded-lg sm:rounded-xl",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(S,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 text-yellow-400 flex-shrink-0 mt-0.5"}),e.jsxs("p",{className:"text-xs sm:text-sm text-yellow-300",children:[e.jsx("span",{className:"font-semibold",children:"Don't forget:"})," To unlock full agent capabilities, make sure to connect integrations."]})]})}),U.length>0&&e.jsxs("div",{className:"p-2.5 sm:p-4 bg-gray-800/50 rounded-lg sm:rounded-xl border border-gray-700",children:[e.jsxs("div",{className:"flex items-center mb-2.5 sm:mb-4",children:[e.jsx(k,{className:"w-3.5 h-3.5 sm:w-5 sm:h-5 text-blue-500 mr-1.5 sm:mr-2"}),e.jsx("h3",{className:"text-sm sm:text-lg font-semibold text-white",children:"Knowledge Base"})]}),e.jsxs("div",{className:"space-y-1 sm:space-y-2",children:[U.slice(0,5).map((s,r)=>e.jsxs(t.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3,delay:1.2+.1*r},className:"flex items-center p-1.5 sm:p-3 bg-gray-700/50 rounded-lg hover:bg-gray-700/70 transition-colors",children:[e.jsx("div",{className:"text-sm sm:text-lg mr-1.5 sm:mr-3 flex-shrink-0",children:ge(s.filename)}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-xs sm:text-sm font-medium text-gray-200 truncate",children:s.filename}),e.jsxs("div",{className:"flex items-center text-xs text-gray-400 mt-0.5 sm:mt-1",children:[e.jsx(C,{className:"w-2.5 h-2.5 sm:w-3 sm:h-3 mr-0.5 sm:mr-1"}),e.jsx("span",{children:new Date(s.created_at).toLocaleDateString()}),s.summary&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"mx-1 sm:mx-2",children:"•"}),e.jsx("span",{className:"truncate max-w-24 sm:max-w-32",children:s.summary})]})]})]})]},s.file_id)),U.length>5&&e.jsxs("div",{className:"flex items-center p-1.5 sm:p-3 bg-gray-700/50 rounded-lg",children:[e.jsx("div",{className:"text-sm sm:text-lg mr-1.5 sm:mr-3 flex-shrink-0",children:"📁"}),e.jsxs("span",{className:"text-xs sm:text-sm text-gray-400",children:["+",U.length-5," more files"]})]})]})]}),z.length>0&&e.jsxs("div",{className:"p-2.5 sm:p-4 bg-gray-800/50 rounded-lg sm:rounded-xl border border-gray-700",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2.5 sm:mb-4",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx($,{className:"w-3.5 h-3.5 sm:w-5 sm:h-5 text-orange-500 mr-1.5 sm:mr-2"}),e.jsx("h3",{className:"text-sm sm:text-lg font-semibold text-white",children:"Automated Triggers"})]}),e.jsx("span",{className:"text-xs text-gray-400 hidden sm:inline",children:"Times in local timezone"})]}),e.jsxs("div",{className:"space-y-1 sm:space-y-2",children:[z.slice(0,3).map((s,r)=>e.jsxs(t.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3,delay:1.3+.1*r},className:"flex items-start p-1.5 sm:p-3 bg-gray-700/50 rounded-lg hover:bg-gray-700/70 transition-colors",children:[e.jsx("div",{className:"mr-1.5 sm:mr-3 flex-shrink-0 mt-0.5",children:"cron"===s.trigger_type?e.jsx($,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 text-orange-400"}):"WHATSAPP_GROUP_MESSAGE"===s.trigger_type?e.jsx("img",{src:"/WhatsApp-icon.svg",alt:"WhatsApp",className:"w-3.5 h-3.5 sm:w-4 sm:h-4"}):e.jsx("img",{src:f(j(s.trigger_type)),alt:"",className:"w-3.5 h-3.5 sm:w-4 sm:h-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center flex-wrap gap-1.5",children:[e.jsx("div",{className:"text-xs sm:text-sm font-medium text-gray-200",children:"cron"===s.trigger_type?he(s.cron_expression||""):te[s.trigger_type]||s.trigger_type.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}),"WHATSAPP_GROUP_MESSAGE"===s.trigger_type&&e.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium bg-green-500/15 text-green-400 border border-green-500/20",children:s.whatsapp_trigger?.only_on_mention?"Replies when mentioned":"Replies to all"})]}),e.jsx("div",{className:"text-xs text-gray-400 mt-0.5 sm:mt-1 line-clamp-2",children:s.message}),s.output?.output_type&&"no_output"!==s.output.output_type&&e.jsx("div",{className:"flex items-center text-xs text-gray-500 mt-1 mb-1",children:"email"===s.output.output_type?e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(T,{className:"h-3 w-3 text-purple-400"}),e.jsxs("span",{children:["Email: ",s.output.output_email||"Not set"]})]}):"whatsapp"===s.output.output_type?e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("img",{src:"/WhatsApp-icon.svg",alt:"WhatsApp",className:"h-3 w-3"}),e.jsxs("span",{children:["WhatsApp: ",le[s.trigger_id]?.groupName?le[s.trigger_id].groupName:le[s.trigger_id]?.phoneNumber?le[s.trigger_id].phoneNumber:s.output.output_whatsapp_group_chat_id?"Group":"Number"]})]}):null}),"no_output"===s.output?.output_type&&e.jsx("div",{className:"flex items-center text-xs text-gray-500 mt-1 mb-1",children:e.jsx("span",{className:"text-gray-400 italic",children:"No output"})}),e.jsx("div",{className:"flex items-center text-xs text-gray-500",children:e.jsx("span",{className:"px-1.5 py-0.5 rounded-full text-xs "+(s.is_enabled?"bg-green-500/20 text-green-400":"bg-gray-500/20 text-gray-400"),children:s.is_enabled?"Active":"Disabled"})})]})]},s.trigger_id)),z.length>3&&e.jsxs("div",{className:"flex items-center p-1.5 sm:p-3 bg-gray-700/50 rounded-lg",children:[e.jsx("div",{className:"text-sm sm:text-lg mr-1.5 sm:mr-3 flex-shrink-0",children:"⏰"}),e.jsxs("span",{className:"text-xs sm:text-sm text-gray-400",children:["+",z.length-3," more triggers"]})]})]})]})]}),e.jsxs(t.div,{initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},transition:{duration:.5,delay:1.3},className:"flex flex-col sm:flex-row gap-2 sm:gap-4 pt-3 sm:pt-6",children:[e.jsxs("button",{onClick:()=>{P(`/agent-mode/${E}`)},className:"flex-1 bg-gradient-to-r from-purple-500 via-pink-500 to-yellow-500 hover:from-purple-600 hover:via-pink-600 hover:to-yellow-600 text-white px-3 sm:px-6 py-2 sm:py-4 rounded-lg sm:rounded-xl font-semibold transition-all duration-200 flex items-center justify-center group text-xs sm:text-base",children:[e.jsx("span",{children:"Go to Agent"}),e.jsx(I,{className:"w-3.5 h-3.5 sm:w-5 sm:h-5 ml-1.5 sm:ml-2 transition-transform group-hover:translate-x-1"})]}),e.jsxs("button",{onClick:()=>{P("/agents")},className:"flex-1 bg-gray-800 hover:bg-gray-700 text-white border border-gray-700 hover:border-gray-600 px-3 sm:px-6 py-2 sm:py-4 rounded-lg sm:rounded-xl font-semibold transition-all duration-200 flex items-center justify-center group text-xs sm:text-base",children:[e.jsx(W,{className:"w-3.5 h-3.5 sm:w-5 sm:h-5 mr-1.5 sm:mr-2"}),e.jsx("span",{children:"Go to Agents"})]})]})]})}),e.jsx(l,{isOpen:X.isOpen,integrationName:X.integrationName,apiKey:X.apiKey,onApiKeyChange:e=>ee(t=>({...t,apiKey:e})),onSubmit:async()=>{X.toolType&&X.apiKey.trim()&&(ee(e=>({...e,isOpen:!1})),await ue(X.toolType,X.apiKey.trim()),ee({isOpen:!1,toolType:null,integrationType:null,integrationName:null,apiKey:""}))},onCancel:()=>ee({isOpen:!1,toolType:null,integrationType:null,integrationName:null,apiKey:""})}),e.jsx(o,{isOpen:re,onClose:()=>ae(!1),onVerificationComplete:async()=>{const e=await n.getStatus();H(e.integrations)}}),e.jsx(b,{isOpen:ie.isOpen,onClose:()=>ne({isOpen:!1,feature:null}),feature:ie.feature})]})}export{E as AgentSummary};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.