apteva 0.4.18 → 0.4.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActivityPage.h769ek3a.js +3 -0
- package/dist/ApiDocsPage.kf6bbwkk.js +4 -0
- package/dist/{App.nps62kvt.js → App.039re6cf.js} +3 -3
- package/dist/App.2jmkqm8c.js +4 -0
- package/dist/{App.np463xvy.js → App.2yy66bnp.js} +3 -3
- package/dist/App.3515wsb4.js +4 -0
- package/dist/App.7v1w3ys9.js +4 -0
- package/dist/{App.nft7h9jt.js → App.c90t3dxg.js} +3 -3
- package/dist/App.edwahsvz.js +4 -0
- package/dist/App.jfx3der4.js +4 -0
- package/dist/App.n4jb3c22.js +13 -0
- package/dist/{App.mq6jqare.js → App.p02f4ret.js} +1 -1
- package/dist/App.q3bpx15d.js +20 -0
- package/dist/App.r0a2nmqs.js +267 -0
- package/dist/App.s2yrcz15.js +4 -0
- package/dist/App.s5j82a5j.js +4 -0
- package/dist/App.tg1b94tx.js +4 -0
- package/dist/ConnectionsPage.a67fjgbf.js +3 -0
- package/dist/McpPage.d4p3xvtk.js +3 -0
- package/dist/SettingsPage.46sqpe39.js +3 -0
- package/dist/SkillsPage.j9hkqm99.js +3 -0
- package/dist/TasksPage.6pvkb7s7.js +3 -0
- package/dist/TelemetryPage.5zq9msb5.js +3 -0
- package/dist/TestsPage.24432yqt.js +3 -0
- package/dist/apteva-kit.css +1 -1
- package/dist/index.html +1 -1
- package/dist/styles.css +1 -1
- package/package.json +9 -4
- package/src/channels/index.ts +40 -0
- package/src/channels/telegram.ts +306 -0
- package/src/db.ts +180 -0
- package/src/integrations/agentdojo.ts +1 -1
- package/src/mcp-handler.ts +31 -24
- package/src/mcp-platform.ts +353 -2
- package/src/providers.ts +22 -9
- package/src/routes/api/agents.ts +15 -2
- package/src/routes/api/channels.ts +182 -0
- package/src/routes/api/integrations.ts +13 -5
- package/src/routes/api/mcp.ts +27 -9
- package/src/routes/api/system.ts +12 -1
- package/src/routes/api/telemetry.ts +30 -0
- package/src/routes/api/triggers.ts +22 -2
- package/src/routes/api.ts +3 -1
- package/src/routes/auth.ts +11 -2
- package/src/server.ts +39 -4
- package/src/triggers/agentdojo.ts +23 -18
- package/src/tui/AgentList.tsx +145 -0
- package/src/tui/App.tsx +102 -0
- package/src/tui/Login.tsx +104 -0
- package/src/tui/api.ts +72 -0
- package/src/tui/index.tsx +7 -0
- package/src/web/App.tsx +2 -2
- package/src/web/components/agents/AgentPanel.tsx +4 -37
- package/src/web/components/common/Icons.tsx +8 -0
- package/src/web/components/connections/OverviewTab.tsx +22 -68
- package/src/web/components/connections/TriggersTab.tsx +549 -70
- package/src/web/components/dashboard/Dashboard.tsx +5 -4
- package/src/web/components/layout/Header.tsx +196 -4
- package/src/web/components/settings/SettingsPage.tsx +269 -1
- package/src/web/context/AuthContext.tsx +18 -11
- package/src/web/context/TelemetryContext.tsx +14 -1
- package/src/web/context/index.ts +1 -1
- package/src/web/hooks/useAgents.ts +7 -3
- package/src/web/hooks/useOnboarding.ts +9 -30
- package/dist/ActivityPage.yv28a2vj.js +0 -3
- package/dist/ApiDocsPage.4ccwjjbk.js +0 -4
- package/dist/App.155wke5v.js +0 -4
- package/dist/App.2e19nvn4.js +0 -13
- package/dist/App.2ye1b5n0.js +0 -4
- package/dist/App.4da4ycbe.js +0 -4
- package/dist/App.b6wtzd1j.js +0 -4
- package/dist/App.fjrh28tf.js +0 -4
- package/dist/App.htc36cy8.js +0 -4
- package/dist/App.me6reaa6.js +0 -4
- package/dist/App.n5q6p960.js +0 -4
- package/dist/App.q8ws33cc.js +0 -181
- package/dist/App.tb0y0jmt.js +0 -40
- package/dist/ConnectionsPage.52evzrp7.js +0 -3
- package/dist/McpPage.bjqrp0n2.js +0 -3
- package/dist/SettingsPage.es76hnj2.js +0 -3
- package/dist/SkillsPage.06h8yf0h.js +0 -3
- package/dist/TasksPage.99df66mk.js +0 -3
- package/dist/TelemetryPage.bmdnxhq7.js +0 -3
- package/dist/TestsPage.denxrg8c.js +0 -3
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{i as cn}from"./App.7v1w3ys9.js";import{P as A}from"./App.039re6cf.js";import{Q as K,T as vn,U as Z,aa as S,da as x}from"./App.q3bpx15d.js";var Sn=K(vn(),1);var u=K(vn(),1);var p=K(Z(),1);function dn(){let{authFetch:N}=S(),{currentProjectId:b}=x(),[O,U]=u.useState([]),[B,g]=u.useState([]),[H,F]=u.useState(!0);if(u.useEffect(()=>{(async()=>{F(!0);let Q=b&&b!=="unassigned"?`?project_id=${b}`:"";try{let[w,X]=await Promise.all([N(`/api/subscriptions${Q}`).catch(()=>null),N("/api/agents").catch(()=>null)]);if(w?.ok){let L=await w.json();U(L.subscriptions||[])}if(X?.ok){let L=await X.json();g(L.agents||[])}}catch(w){console.error("Failed to fetch overview data:",w)}F(!1)})()},[N,b]),H)return p.jsxDEV("div",{className:"text-center py-12 text-[#666]",children:"Loading..."},void 0,!1,void 0,this);let I=O.filter(($)=>$.enabled),P=O.filter(($)=>!$.enabled),q=new Map(B.map(($)=>[$.id,$]));return p.jsxDEV("div",{className:"space-y-6",children:[p.jsxDEV("div",{className:"grid grid-cols-3 gap-4",children:[p.jsxDEV(Kn,{label:"Active",value:I.length},void 0,!1,void 0,this),p.jsxDEV(Kn,{label:"Disabled",value:P.length},void 0,!1,void 0,this),p.jsxDEV(Kn,{label:"Total",value:O.length},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p.jsxDEV("section",{children:[p.jsxDEV("h3",{className:"text-sm font-medium text-[#888] mb-3",children:["Subscriptions (",O.length,")"]},void 0,!0,void 0,this),O.length===0?p.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-6 text-center text-[#666] text-sm",children:"No subscriptions yet. Go to the Triggers tab to create one."},void 0,!1,void 0,this):p.jsxDEV("div",{className:"space-y-2",children:O.map(($)=>{let Q=q.get($.agent_id);return p.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-3 flex items-center gap-3",children:[p.jsxDEV("div",{className:`w-2 h-2 rounded-full flex-shrink-0 ${$.enabled?"bg-green-400":"bg-[#555]"}`},void 0,!1,void 0,this),p.jsxDEV("div",{className:"flex-1 min-w-0",children:[p.jsxDEV("div",{className:"text-sm font-medium truncate",children:$.trigger_slug.replace(/_/g," ").replace(/-/g," ")},void 0,!1,void 0,this),p.jsxDEV("div",{className:"text-xs text-[#666]",children:$.trigger_instance_id?`ID: ${$.trigger_instance_id.slice(0,12)}...`:"All instances"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p.jsxDEV("div",{className:"text-xs text-[#888] flex-shrink-0",children:[p.jsxDEV("span",{className:"text-[#555]",children:"→"},void 0,!1,void 0,this)," ",p.jsxDEV("span",{className:"text-[#f97316]",children:Q?.name||"Unknown Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded flex-shrink-0 ${$.enabled?"bg-green-500/10 text-green-400":"bg-[#1a1a1a] text-[#555]"}`,children:$.enabled?"active":"disabled"},void 0,!1,void 0,this)]},$.id,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Kn({label:N,value:b,valueColor:O}){return p.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[p.jsxDEV("div",{className:"text-xs text-[#666] mb-1",children:N},void 0,!1,void 0,this),p.jsxDEV("div",{className:`text-2xl font-bold ${O||"text-[#e0e0e0]"}`,children:b},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var v=K(vn(),1);var C=K(Z(),1);function _l({message:N="Loading...",fullScreen:b=!1}){let O=C.jsxDEV("div",{className:"flex items-center gap-3 text-[#666]",children:[C.jsxDEV("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[C.jsxDEV("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"},void 0,!1,void 0,this),C.jsxDEV("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C.jsxDEV("span",{children:N},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(b)return C.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center",children:O},void 0,!1,void 0,this);return C.jsxDEV("div",{className:"flex items-center justify-center py-20",children:O},void 0,!1,void 0,this)}var l=K(Z(),1);function Tn(){let{authFetch:N}=S(),{currentProjectId:b}=x(),[O,U]=v.useState([]),[B,g]=v.useState("composio"),[H,F]=v.useState([]),[I,P]=v.useState(!0),[q,$]=v.useState([]),[Q,w]=v.useState([]),[X,L]=v.useState(!1),[r,Un]=v.useState(""),[Nn,Wn]=v.useState(""),[xn,t]=v.useState(!1),[G,j]=v.useState(null),[fn,gn]=v.useState([]),[e,Jn]=v.useState(""),[an,nn]=v.useState(!1),[V,Xn]=v.useState(""),[bn,Yn]=v.useState({}),[Vn,_n]=v.useState(!1),[y,sn]=v.useState([]),[En,Zn]=v.useState(!1),[wn,Dn]=v.useState([]),[s,Ln]=v.useState(""),[d,Mn]=v.useState(""),[qn,Qn]=v.useState(!1),[pn,kn]=v.useState(""),[$n,Rn]=v.useState({}),[rn,ln]=v.useState(!1),[T,On]=v.useState(""),[mn,zn]=v.useState(""),[Cn,Fn]=v.useState(!1),[k,tn]=v.useState([]),[In,R]=v.useState(null),z=b&&b!=="unassigned"?`?project_id=${b}`:"",Pn=v.useCallback(async()=>{try{let n=await N(`/api/triggers/providers${z}`);if(n.ok){let m=await n.json();U(m.providers||[])}}catch(n){console.error("Failed to fetch providers:",n)}},[N]),h=v.useCallback(async()=>{P(!0);try{let n=`provider=${B}`,m=z?"&":"?",i=z?`/api/triggers${z}&${n}`:`/api/triggers?${n}`,f=await N(i);if(f.ok){let _=await f.json();F(_.triggers||[])}}catch(n){console.error("Failed to fetch triggers:",n)}P(!1)},[N,z,B]),E=v.useCallback(async()=>{try{let n=await N(`/api/subscriptions${z}`);if(n.ok){let m=await n.json();$(m.subscriptions||[])}}catch(n){console.error("Failed to fetch subscriptions:",n)}},[N,z]),yn=v.useCallback(async()=>{try{let n=await N("/api/agents");if(n.ok){let m=await n.json();tn(m.agents||[])}}catch(n){}},[N]);v.useEffect(()=>{Pn(),h(),E(),yn()},[Pn,h,E,yn]);let jn=async(n)=>{L(!0);try{let m=`/api/triggers/types?provider=${B}`;if(n)m+=`&toolkit_slugs=${n}`;if(b&&b!=="unassigned")m+=`&project_id=${b}`;let i=await N(m);if(i.ok){let f=await i.json();w(f.types||[])}else{let f=await i.json();R(f.error||"Failed to fetch trigger types")}}catch(m){R("Failed to fetch trigger types")}L(!1)},en=async()=>{try{let n=await N(`/api/integrations/${B}/connected${z}`);if(n.ok){let m=await n.json();gn((m.accounts||[]).filter((i)=>i.status==="active"))}}catch(n){}},nl=(n)=>{j(n),Jn(""),Xn(""),Yn({}),t(!0),en()},J=B==="agentdojo",ll=async()=>{_n(!0),Ln(""),Mn(""),kn(""),Rn({}),console.log("[openAddDojoSub] Opening modal, selectedProvider:",B),console.log("[openAddDojoSub] currentProjectId:",b,"projectParam:",z),console.log("[openAddDojoSub] existing dojoTriggerTypes:",y.length,"dojoAccounts:",wn.length);let n=async()=>{if(y.length>0){console.log("[openAddDojoSub] Already have",y.length,"trigger types, skipping fetch");return}Zn(!0);try{let i="/api/triggers/types?provider=agentdojo";if(b&&b!=="unassigned")i+=`&project_id=${b}`;console.log("[openAddDojoSub] Fetching trigger types:",i);let f=await N(i),_=await f.json();if(console.log("[openAddDojoSub] Trigger types response:",f.status,"ok:",f.ok,"types count:",(_.types||[]).length,"error:",_.error),_.types&&_.types.length>0)console.log("[openAddDojoSub] Sample trigger type:",JSON.stringify(_.types[0]));sn(_.types||[])}catch(i){console.error("[openAddDojoSub] Failed to load trigger types:",i)}Zn(!1)},m=async()=>{try{let i=`/api/integrations/agentdojo/connected${z}`;console.log("[openAddDojoSub] Fetching connected accounts:",i);let f=await N(i),_=await f.json();if(console.log("[openAddDojoSub] Connected accounts response:",f.status,"ok:",f.ok,"accounts count:",(_.accounts||[]).length,"error:",_.error),_.accounts&&_.accounts.length>0)console.log("[openAddDojoSub] Sample account:",JSON.stringify(_.accounts[0]));let M=(_.accounts||[]).filter((c)=>c.status==="active");console.log("[openAddDojoSub] Active accounts:",M.length),Dn(M)}catch(i){console.error("[openAddDojoSub] Failed to load connected accounts:",i)}};await Promise.all([n(),m()])},ml=async()=>{let n=y.find((i)=>i.slug===s),m=n?Gn(wn,n.toolkit_slug):null;if(console.log("[handleAddDojoSub] tt:",n?.slug,"matched:",m?.id,m?.appName,"agentId:",d),!n||!d||!m)return;Qn(!0),R(null);try{let i=k.find((bl)=>bl.id===d),f="provider=agentdojo",_=z?`/api/triggers${z}&provider=agentdojo`:"/api/triggers?provider=agentdojo",M={callback_url:`${window.location.origin}/api/webhooks/agentdojo`,title:`${n.name} → ${i?.name||"Agent"}`,server:n.toolkit_slug,agent_id:d,...$n};console.log("[handleAddDojoSub] config:",JSON.stringify(M));let c=await N(_,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({slug:n.slug,connectedAccountId:m.id,config:M})}),al=await c.json();if(!c.ok)R(al.error||"Failed to create subscription");else _n(!1),h()}catch(i){R(i.message||"Failed to create subscription")}Qn(!1)},il=async()=>{if(!G)return;if(J){if(!V||!D)return;nn(!0),R(null);try{let n=k.find((c)=>c.id===V),m=window.location.origin,i=`provider=${B}`,f=z?`/api/triggers${z}&${i}`:`/api/triggers?${i}`,_=await N(f,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({slug:G.slug,connectedAccountId:D.id,config:{callback_url:`${m}/api/webhooks/agentdojo`,title:`${G.name} → ${n?.name||"Agent"}`,server:G.toolkit_slug,agent_id:V,...bn}})}),M=await _.json();if(!_.ok)R(M.error||"Failed to create subscription");else t(!1),j(null),h()}catch(n){R(n.message||"Failed to create subscription")}nn(!1);return}if(!e)return;nn(!0),R(null);try{let n=`provider=${B}`,m=z?`/api/triggers${z}&${n}`:`/api/triggers?${n}`,i=await N(m,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({slug:G.slug,connectedAccountId:e})}),f=await i.json();if(!i.ok)R(f.error||"Failed to create trigger");else t(!1),j(null),h()}catch(n){R(n.message||"Failed to create trigger")}nn(!1)},hn=async(n,m)=>{let i=m==="active"?"disable":"enable";try{let f=z?`&provider=${B}`:`?provider=${B}`,_=await N(`/api/triggers/${n}/${i}${z}${f}`,{method:"POST"});if(_.ok)h();else{let M=await _.json();R(M.error||`Failed to ${i} trigger`)}}catch(f){R(`Failed to ${i} trigger`)}},An=async(n)=>{try{let m=z?`&provider=${B}`:`?provider=${B}`,i=await N(`/api/triggers/${n}${z}${m}`,{method:"DELETE"});if(i.ok)h();else{let f=await i.json();R(f.error||"Failed to delete trigger")}}catch(m){R("Failed to delete trigger")}},vl=async()=>{if(!T||!mn)return;let n=H.find((m)=>m.id===T);if(!n)return;Fn(!0),R(null);try{let m=await N("/api/subscriptions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({trigger_slug:n.trigger_slug,trigger_instance_id:n.id,agent_id:mn,provider:B,project_id:b&&b!=="unassigned"?b:null,public_url:window.location.origin})}),i=await m.json();if(!m.ok)R(i.error||"Failed to create subscription");else ln(!1),On(""),zn(""),E()}catch(m){R(m.message||"Failed to create subscription")}Fn(!1)},Nl=async(n)=>{let m=n.enabled?"disable":"enable";try{if((await N(`/api/subscriptions/${n.id}/${m}`,{method:"POST"})).ok)E()}catch(i){R(`Failed to ${m} subscription`)}},fl=async(n)=>{try{if((await N(`/api/subscriptions/${n}`,{method:"DELETE"})).ok)E()}catch(m){R("Failed to delete subscription")}},Bn=Q.filter((n)=>{if(!Nn)return!0;let m=Nn.toLowerCase();return n.name.toLowerCase().includes(m)||n.slug.toLowerCase().includes(m)||n.description.toLowerCase().includes(m)}),Gn=(n,m)=>{if(!m||n.length===0)return null;let i=m.toLowerCase();return n.find((f)=>f.appId?.toLowerCase()===i||f.appName?.toLowerCase()===i||f.appId?.toLowerCase().includes(i)||f.appName?.toLowerCase().includes(i))||null},Y=y.find((n)=>n.slug===s),Hn=Y?Gn(wn,Y.toolkit_slug):null,D=G&&J?Gn(fn,G.toolkit_slug):null,on=new Map(k.map((n)=>[n.id,n]));return l.jsxDEV("div",{className:"space-y-6",children:[In&&l.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 border border-red-500/20 rounded-lg flex items-center justify-between",children:[l.jsxDEV("span",{children:In},void 0,!1,void 0,this),l.jsxDEV("button",{onClick:()=>R(null),className:"text-red-400 hover:text-red-300",children:"x"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O.length>1&&l.jsxDEV("div",{className:"flex items-center gap-2",children:[l.jsxDEV("span",{className:"text-xs text-[#666]",children:"Provider:"},void 0,!1,void 0,this),l.jsxDEV("div",{className:"flex gap-1 bg-[#111] border border-[#1a1a1a] rounded-lg p-0.5",children:O.map((n)=>l.jsxDEV("button",{onClick:()=>{g(n.id),w([]),Un(""),Wn("")},className:`px-3 py-1 rounded text-xs font-medium transition ${B===n.id?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:[n.name,!n.connected&&l.jsxDEV("span",{className:"ml-1 text-[10px] text-yellow-500",title:"API key not configured",children:"!"},void 0,!1,void 0,this)]},n.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),!J&&l.jsxDEV("section",{children:[l.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[l.jsxDEV("h3",{className:"text-sm font-medium text-[#888]",children:["Subscriptions (",q.length,")"]},void 0,!0,void 0,this),l.jsxDEV("button",{onClick:()=>ln(!0),className:"text-xs bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-3 py-1.5 rounded transition",children:"+ Add Subscription"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.length===0?l.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-6 text-center text-[#666] text-sm",children:"No subscriptions yet. Add one to route trigger events to an agent."},void 0,!1,void 0,this):l.jsxDEV("div",{className:"space-y-2",children:q.map((n)=>{let m=on.get(n.agent_id);return l.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-3 flex items-center gap-3",children:[l.jsxDEV("div",{className:`w-2 h-2 rounded-full flex-shrink-0 ${n.enabled?"bg-green-400":"bg-[#666]"}`},void 0,!1,void 0,this),l.jsxDEV("div",{className:"flex-1 min-w-0",children:[l.jsxDEV("div",{className:"text-sm font-medium truncate",children:[n.trigger_slug.replace(/_/g," "),l.jsxDEV("span",{className:"text-[#555] mx-1.5",children:"→"},void 0,!1,void 0,this),l.jsxDEV("span",{className:"text-[#f97316]",children:m?.name||"Unknown Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.jsxDEV("div",{className:"text-xs text-[#666]",children:n.trigger_instance_id?`Instance: ${n.trigger_instance_id.slice(0,12)}...`:"All instances"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.jsxDEV("div",{className:"flex items-center gap-2 flex-shrink-0",children:[l.jsxDEV("button",{onClick:()=>Nl(n),className:`text-xs px-3 py-1 rounded transition ${n.enabled?"bg-yellow-500/10 text-yellow-400 hover:bg-yellow-500/20":"bg-green-500/10 text-green-400 hover:bg-green-500/20"}`,children:n.enabled?"Disable":"Enable"},void 0,!1,void 0,this),l.jsxDEV("button",{onClick:()=>fl(n.id),className:"text-xs text-[#666] hover:text-red-400 transition px-2",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},n.id,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this),!J&&l.jsxDEV("section",{children:[l.jsxDEV("h3",{className:"text-sm font-medium text-[#888] mb-3",children:["Trigger Instances (",H.length,")"]},void 0,!0,void 0,this),I?l.jsxDEV("div",{className:"text-center py-6 text-[#666] text-sm",children:"Loading triggers..."},void 0,!1,void 0,this):H.length===0?l.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-6 text-center text-[#666] text-sm",children:"No trigger instances. Browse trigger types below to create one."},void 0,!1,void 0,this):l.jsxDEV("div",{className:"space-y-2",children:H.map((n)=>l.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-3 flex items-center gap-3",children:[l.jsxDEV("div",{className:`w-2 h-2 rounded-full flex-shrink-0 ${n.status==="active"?"bg-green-400":"bg-[#666]"}`},void 0,!1,void 0,this),l.jsxDEV("div",{className:"flex-1 min-w-0",children:[l.jsxDEV("div",{className:"text-sm font-medium truncate",children:n.trigger_slug.replace(/_/g," ")},void 0,!1,void 0,this),l.jsxDEV("div",{className:"text-xs text-[#666]",children:["ID: ",n.id.slice(0,12),"... | Created: ",new Date(n.created_at).toLocaleDateString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),l.jsxDEV("div",{className:"flex items-center gap-2 flex-shrink-0",children:[l.jsxDEV("button",{onClick:()=>hn(n.id,n.status),className:`text-xs px-3 py-1 rounded transition ${n.status==="active"?"bg-yellow-500/10 text-yellow-400 hover:bg-yellow-500/20":"bg-green-500/10 text-green-400 hover:bg-green-500/20"}`,children:n.status==="active"?"Disable":"Enable"},void 0,!1,void 0,this),l.jsxDEV("button",{onClick:()=>An(n.id),className:"text-xs text-[#666] hover:text-red-400 transition px-2",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},n.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J&&l.jsxDEV("section",{children:[l.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[l.jsxDEV("h3",{className:"text-sm font-medium text-[#888]",children:["Active Subscriptions (",H.length,")"]},void 0,!0,void 0,this),l.jsxDEV("button",{onClick:ll,className:"text-xs bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-3 py-1.5 rounded transition",children:"+ Add Subscription"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I?l.jsxDEV("div",{className:"text-center py-6 text-[#666] text-sm",children:"Loading subscriptions..."},void 0,!1,void 0,this):H.length===0?l.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-6 text-center text-[#666] text-sm",children:"No active subscriptions. Browse trigger types below to create one."},void 0,!1,void 0,this):l.jsxDEV("div",{className:"space-y-2",children:H.map((n)=>{let m=q.find((f)=>f.trigger_instance_id===n.id),i=m?on.get(m.agent_id):null;return l.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-3 flex items-center gap-3",children:[l.jsxDEV("div",{className:`w-2 h-2 rounded-full flex-shrink-0 ${n.status==="active"?"bg-green-400":"bg-[#666]"}`},void 0,!1,void 0,this),l.jsxDEV("div",{className:"flex-1 min-w-0",children:[l.jsxDEV("div",{className:"text-sm font-medium truncate",children:[n.config?.title||n.trigger_slug.replace(/_/g," "),i&&l.jsxDEV(l.Fragment,{children:[l.jsxDEV("span",{className:"text-[#555] mx-1.5",children:"→"},void 0,!1,void 0,this),l.jsxDEV("span",{className:"text-[#f97316]",children:i.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),l.jsxDEV("div",{className:"text-xs text-[#666]",children:[n.config?.server&&l.jsxDEV("span",{children:[String(n.config.server)," | "]},void 0,!0,void 0,this),"ID: ",String(n.id).slice(0,8)," | Created: ",new Date(n.created_at).toLocaleDateString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),l.jsxDEV("div",{className:"flex items-center gap-2 flex-shrink-0",children:[l.jsxDEV("button",{onClick:()=>hn(n.id,n.status),className:`text-xs px-3 py-1 rounded transition ${n.status==="active"?"bg-yellow-500/10 text-yellow-400 hover:bg-yellow-500/20":"bg-green-500/10 text-green-400 hover:bg-green-500/20"}`,children:n.status==="active"?"Disable":"Enable"},void 0,!1,void 0,this),l.jsxDEV("button",{onClick:()=>An(n.id),className:"text-xs text-[#666] hover:text-red-400 transition px-2",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},n.id,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.jsxDEV("section",{children:[l.jsxDEV("h3",{className:"text-sm font-medium text-[#888] mb-3",children:"Browse Trigger Types"},void 0,!1,void 0,this),l.jsxDEV("div",{className:"flex gap-2 mb-3",children:[l.jsxDEV("input",{type:"text",value:r,onChange:(n)=>Un(n.target.value),placeholder:"Toolkit filter (e.g. github, gmail, slack)",className:"flex-1 bg-[#111] border border-[#333] rounded px-3 py-2 text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),l.jsxDEV("button",{onClick:()=>jn(r||void 0),disabled:X,className:"text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-4 py-2 rounded transition disabled:opacity-50",children:X?"Loading...":"Browse"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q.length>0&&l.jsxDEV(l.Fragment,{children:[l.jsxDEV("input",{type:"text",value:Nn,onChange:(n)=>Wn(n.target.value),placeholder:"Search trigger types...",className:"w-full bg-[#111] border border-[#333] rounded px-3 py-2 text-sm mb-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),l.jsxDEV("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:Bn.slice(0,30).map((n)=>l.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] hover:border-[#333] rounded-lg p-3 transition",children:[l.jsxDEV("div",{className:"flex items-start gap-3",children:[n.logo?l.jsxDEV("img",{src:n.logo,alt:n.toolkit_name,className:"w-8 h-8 rounded object-contain flex-shrink-0"},void 0,!1,void 0,this):l.jsxDEV("div",{className:"w-8 h-8 rounded bg-[#1a1a1a] flex items-center justify-center text-xs flex-shrink-0",children:n.toolkit_name?.[0]?.toUpperCase()||"?"},void 0,!1,void 0,this),l.jsxDEV("div",{className:"flex-1 min-w-0",children:[l.jsxDEV("div",{className:"text-sm font-medium truncate",children:n.name},void 0,!1,void 0,this),l.jsxDEV("div",{className:"text-xs text-[#666]",children:n.toolkit_name},void 0,!1,void 0,this),l.jsxDEV("div",{className:"text-xs text-[#555] mt-1 line-clamp-2",children:n.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),l.jsxDEV("button",{onClick:()=>nl(n),className:"w-full mt-3 text-xs bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-3 py-1.5 rounded transition",children:J?"Subscribe":"Create Trigger"},void 0,!1,void 0,this)]},n.slug,!0,void 0,this))},void 0,!1,void 0,this),Bn.length>30&&l.jsxDEV("p",{className:"text-xs text-[#555] mt-3 text-center",children:["Showing first 30 of ",Bn.length," types. Use search to filter."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),xn&&G&&l.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:l.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-md mx-4",children:[l.jsxDEV("h3",{className:"font-medium mb-1",children:J?"Create Subscription":"Create Trigger"},void 0,!1,void 0,this),l.jsxDEV("p",{className:"text-xs text-[#666] mb-4",children:[G.name,G.toolkit_name&&l.jsxDEV("span",{className:"text-[#555]",children:[" (",G.toolkit_name,")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),l.jsxDEV("div",{className:"space-y-4",children:[!J&&l.jsxDEV("div",{children:[l.jsxDEV("label",{className:"block text-xs text-[#888] mb-1.5",children:"Connected Account"},void 0,!1,void 0,this),fn.length===0?l.jsxDEV("div",{className:"text-xs text-[#666] bg-[#0a0a0a] rounded p-3",children:"No connected accounts available. Connect an app first in the Integrations tab."},void 0,!1,void 0,this):l.jsxDEV(A,{value:e,onChange:Jn,placeholder:"Select account...",options:fn.map((n)=>({value:n.id,label:`${n.appName} (${n.id.slice(0,8)}...)`}))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J&&l.jsxDEV("div",{children:[l.jsxDEV("label",{className:"block text-xs text-[#888] mb-1.5",children:"Route to Agent"},void 0,!1,void 0,this),k.length===0?l.jsxDEV("div",{className:"text-xs text-[#666] bg-[#0a0a0a] rounded p-3",children:"No agents available. Create an agent first."},void 0,!1,void 0,this):l.jsxDEV(A,{value:V,onChange:Xn,placeholder:"Select agent...",options:k.map((n)=>({value:n.id,label:`${n.name} (${n.status})`}))},void 0,!1,void 0,this),l.jsxDEV("div",{className:"mt-3",children:[l.jsxDEV("label",{className:"block text-xs text-[#888] mb-1.5",children:"Connected Account"},void 0,!1,void 0,this),D?l.jsxDEV("div",{className:"text-xs text-green-400 bg-green-500/10 border border-green-500/20 rounded p-3",children:["Connected: ",D.appName]},void 0,!0,void 0,this):l.jsxDEV("div",{className:"text-xs text-yellow-400 bg-yellow-500/10 border border-yellow-500/20 rounded p-3",children:["No connected account for ",G?.toolkit_name||"this app",". Connect it first in the Integrations tab."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),G.config_schema&&Object.keys(G.config_schema.properties||{}).length>0&&l.jsxDEV("div",{className:"mt-3",children:[l.jsxDEV("label",{className:"block text-xs text-[#888] mb-1.5",children:"Configuration"},void 0,!1,void 0,this),l.jsxDEV("div",{className:"space-y-2",children:Object.entries(G.config_schema.properties||{}).map(([n,m])=>{let i=(G.config_schema.required||[]).includes(n);return l.jsxDEV("div",{children:[l.jsxDEV("label",{className:"block text-[11px] text-[#888] mb-1",children:[m.title||n,i&&l.jsxDEV("span",{className:"text-red-400 ml-0.5",children:"*"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.jsxDEV("input",{type:"text",value:bn[n]||"",onChange:(f)=>Yn((_)=>({..._,[n]:f.target.value})),placeholder:m.description||`Enter ${m.title||n}...`,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},n,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),l.jsxDEV("div",{className:"flex gap-2 mt-4",children:[l.jsxDEV("button",{onClick:()=>{t(!1),j(null)},className:"flex-1 text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:"Cancel"},void 0,!1,void 0,this),l.jsxDEV("button",{onClick:il,disabled:J?!V||!D||an||G?.config_schema&&(G.config_schema.required||[]).some((n)=>!bn[n]?.trim()):!e||an,className:"flex-1 text-sm bg-[#f97316] hover:bg-[#ea580c] text-white px-4 py-2 rounded transition disabled:opacity-50",children:an?"Creating...":J?"Subscribe":"Create"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),rn&&l.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:l.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-md mx-4",children:[l.jsxDEV("h3",{className:"font-medium mb-1",children:"Route Trigger to Agent"},void 0,!1,void 0,this),l.jsxDEV("p",{className:"text-xs text-[#666] mb-4",children:H.length===0?"No trigger instances yet. Create one first from the Browse section below.":"Select a trigger instance and the agent that should handle its events."},void 0,!1,void 0,this),H.length>0?l.jsxDEV(l.Fragment,{children:[l.jsxDEV("div",{className:"space-y-4",children:[l.jsxDEV("div",{children:[l.jsxDEV("label",{className:"block text-xs text-[#888] mb-1.5",children:"Trigger Instance"},void 0,!1,void 0,this),l.jsxDEV(A,{value:T,onChange:On,placeholder:"Select trigger...",options:H.map((n)=>({value:n.id,label:`${n.trigger_slug.replace(/_/g," ")}`}))},void 0,!1,void 0,this),T&&l.jsxDEV("div",{className:"text-xs text-[#555] mt-1 font-mono",children:["ID: ",T.slice(0,16),"..."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),l.jsxDEV("div",{children:[l.jsxDEV("label",{className:"block text-xs text-[#888] mb-1.5",children:"Target Agent"},void 0,!1,void 0,this),l.jsxDEV(A,{value:mn,onChange:zn,placeholder:"Select agent...",options:k.map((n)=>({value:n.id,label:`${n.name} (${n.status})`}))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),l.jsxDEV("div",{className:"flex gap-2 mt-5",children:[l.jsxDEV("button",{onClick:()=>{ln(!1),On(""),zn("")},className:"flex-1 text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:"Cancel"},void 0,!1,void 0,this),l.jsxDEV("button",{onClick:vl,disabled:!T||!mn||Cn,className:"flex-1 text-sm bg-[#f97316] hover:bg-[#ea580c] text-white px-4 py-2 rounded transition disabled:opacity-50",children:Cn?"Adding...":"Add"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):l.jsxDEV("div",{className:"flex gap-2 mt-4",children:l.jsxDEV("button",{onClick:()=>ln(!1),className:"flex-1 text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:"Close"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),Vn&&l.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:l.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-lg mx-4",children:[l.jsxDEV("h3",{className:"font-medium mb-1",children:"Add Subscription"},void 0,!1,void 0,this),l.jsxDEV("p",{className:"text-xs text-[#666] mb-4",children:"Select a trigger from your connected apps and route it to an agent."},void 0,!1,void 0,this),l.jsxDEV("div",{className:"space-y-4",children:[l.jsxDEV("div",{children:[l.jsxDEV("label",{className:"block text-xs text-[#888] mb-1.5",children:"Trigger"},void 0,!1,void 0,this),En?l.jsxDEV("div",{className:"text-xs text-[#666] bg-[#0a0a0a] rounded p-3",children:"Loading triggers..."},void 0,!1,void 0,this):y.length===0?l.jsxDEV("div",{className:"text-xs text-[#666] bg-[#0a0a0a] rounded p-3",children:"No triggers available. Connect an app first in the Integrations tab."},void 0,!1,void 0,this):l.jsxDEV(l.Fragment,{children:[l.jsxDEV("input",{type:"text",value:pn,onChange:(n)=>kn(n.target.value),placeholder:"Search triggers...",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 text-sm mb-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),l.jsxDEV("div",{className:"max-h-48 overflow-y-auto border border-[#1a1a1a] rounded-lg",children:y.filter((n)=>{if(!pn)return!0;let m=pn.toLowerCase();return n.name.toLowerCase().includes(m)||n.slug.toLowerCase().includes(m)||n.toolkit_name.toLowerCase().includes(m)}).slice(0,50).map((n)=>l.jsxDEV("button",{onClick:()=>{Ln(n.slug),Rn({})},className:`w-full text-left px-3 py-2 text-sm flex items-center gap-2 transition border-b border-[#1a1a1a] last:border-0 ${s===n.slug?"bg-[#f97316]/10 text-[#f97316]":"hover:bg-[#1a1a1a] text-[#ccc]"}`,children:[n.logo?l.jsxDEV("img",{src:n.logo,alt:"",className:"w-5 h-5 rounded object-contain flex-shrink-0"},void 0,!1,void 0,this):l.jsxDEV("div",{className:"w-5 h-5 rounded bg-[#1a1a1a] flex items-center justify-center text-[10px] flex-shrink-0",children:n.toolkit_name?.[0]?.toUpperCase()||"?"},void 0,!1,void 0,this),l.jsxDEV("div",{className:"flex-1 min-w-0",children:[l.jsxDEV("div",{className:"truncate",children:n.name},void 0,!1,void 0,this),l.jsxDEV("div",{className:"text-[10px] text-[#666] truncate",children:n.toolkit_name},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},n.slug,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),s&&l.jsxDEV("div",{children:[l.jsxDEV("label",{className:"block text-xs text-[#888] mb-1.5",children:"Connected Account"},void 0,!1,void 0,this),Hn?l.jsxDEV("div",{className:"text-xs text-green-400 bg-green-500/10 border border-green-500/20 rounded p-3",children:["Connected: ",Hn.appName]},void 0,!0,void 0,this):l.jsxDEV("div",{className:"text-xs text-yellow-400 bg-yellow-500/10 border border-yellow-500/20 rounded p-3",children:["No connected account for ",Y?.toolkit_name||"this app",". Connect it first in the Integrations tab."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y&&Y.config_schema&&Object.keys(Y.config_schema.properties||{}).length>0&&l.jsxDEV("div",{children:[l.jsxDEV("label",{className:"block text-xs text-[#888] mb-1.5",children:"Configuration"},void 0,!1,void 0,this),l.jsxDEV("div",{className:"space-y-2",children:Object.entries(Y.config_schema.properties||{}).map(([n,m])=>{let i=(Y.config_schema.required||[]).includes(n);return l.jsxDEV("div",{children:[l.jsxDEV("label",{className:"block text-[11px] text-[#888] mb-1",children:[m.title||n,i&&l.jsxDEV("span",{className:"text-red-400 ml-0.5",children:"*"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.jsxDEV("input",{type:"text",value:$n[n]||"",onChange:(f)=>Rn((_)=>({..._,[n]:f.target.value})),placeholder:m.description||`Enter ${m.title||n}...`,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},n,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.jsxDEV("div",{children:[l.jsxDEV("label",{className:"block text-xs text-[#888] mb-1.5",children:"Target Agent"},void 0,!1,void 0,this),k.length===0?l.jsxDEV("div",{className:"text-xs text-[#666] bg-[#0a0a0a] rounded p-3",children:"No agents available. Create an agent first."},void 0,!1,void 0,this):l.jsxDEV(A,{value:d,onChange:Mn,placeholder:"Select agent...",options:k.map((n)=>({value:n.id,label:`${n.name} (${n.status})`}))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),l.jsxDEV("div",{className:"flex gap-2 mt-5",children:[l.jsxDEV("button",{onClick:()=>_n(!1),className:"flex-1 text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:"Cancel"},void 0,!1,void 0,this),l.jsxDEV("button",{onClick:ml,disabled:!s||!d||!Hn||qn||Y?.config_schema&&(Y.config_schema.required||[]).some((n)=>!$n[n]?.trim()),className:"flex-1 text-sm bg-[#f97316] hover:bg-[#ea580c] text-white px-4 py-2 rounded transition disabled:opacity-50",children:qn?"Creating...":"Subscribe"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var o=K(vn(),1);var a=K(Z(),1);function un(){let{authFetch:N}=S(),{currentProjectId:b}=x(),O=b&&b!=="unassigned"?b:null,[U,B]=o.useState("composio"),g=[{id:"composio",name:"Composio"},{id:"agentdojo",name:"AgentDojo"}],[H,F]=o.useState(null),[I,P]=o.useState([]),[q,$]=o.useState(!1),Q=o.useCallback(async(w)=>{F(w),$(!0);try{let X=`/api/triggers/types?provider=${U}&toolkit_slugs=${w}`;if(O)X+=`&project_id=${O}`;let L=await N(X);if(L.ok){let r=await L.json();P(r.types||[])}}catch(X){console.error("Failed to fetch trigger types:",X)}$(!1)},[N,O,U]);return a.jsxDEV("div",{children:[a.jsxDEV("p",{className:"text-sm text-[#666] mb-4",children:"Connect external apps via OAuth or API Key. Connected apps can be used for triggers and MCP integrations."},void 0,!1,void 0,this),a.jsxDEV("div",{className:"flex items-center gap-2 mb-4",children:[a.jsxDEV("span",{className:"text-xs text-[#666]",children:"Provider:"},void 0,!1,void 0,this),a.jsxDEV("div",{className:"flex gap-1 bg-[#111] border border-[#1a1a1a] rounded-lg p-0.5",children:g.map((w)=>a.jsxDEV("button",{onClick:()=>B(w.id),className:`px-3 py-1 rounded text-xs font-medium transition ${U===w.id?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:w.name},w.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),a.jsxDEV(cn,{providerId:U,projectId:O,hideMcpConfig:!0,onBrowseTriggers:Q},void 0,!1,void 0,this),H&&a.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:a.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg w-full max-w-2xl mx-4 max-h-[80vh] flex flex-col",children:[a.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between",children:[a.jsxDEV("div",{children:[a.jsxDEV("h3",{className:"font-medium",children:"Trigger Types"},void 0,!1,void 0,this),a.jsxDEV("p",{className:"text-xs text-[#666]",children:H},void 0,!1,void 0,this)]},void 0,!0,void 0,this),a.jsxDEV("button",{onClick:()=>{F(null),P([])},className:"text-[#666] hover:text-white transition text-lg px-2",children:"x"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),a.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:q?a.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading trigger types..."},void 0,!1,void 0,this):I.length===0?a.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"No trigger types available for this app."},void 0,!1,void 0,this):a.jsxDEV("div",{className:"space-y-2",children:I.map((w)=>a.jsxDEV("div",{className:"bg-[#0a0a0a] border border-[#1a1a1a] rounded-lg p-3",children:a.jsxDEV("div",{className:"flex items-start gap-3",children:[w.logo?a.jsxDEV("img",{src:w.logo,alt:w.toolkit_name,className:"w-6 h-6 rounded object-contain flex-shrink-0 mt-0.5"},void 0,!1,void 0,this):a.jsxDEV("div",{className:"w-6 h-6 rounded bg-[#1a1a1a] flex items-center justify-center text-[10px] flex-shrink-0 mt-0.5",children:w.toolkit_name?.[0]?.toUpperCase()||"?"},void 0,!1,void 0,this),a.jsxDEV("div",{className:"flex-1 min-w-0",children:[a.jsxDEV("div",{className:"text-sm font-medium",children:w.name},void 0,!1,void 0,this),a.jsxDEV("div",{className:"text-xs text-[#666] mt-0.5",children:w.description},void 0,!1,void 0,this),a.jsxDEV("div",{className:"flex items-center gap-2 mt-1.5",children:[a.jsxDEV("span",{className:"text-[10px] bg-[#1a1a1a] text-[#555] px-1.5 py-0.5 rounded font-mono",children:w.slug},void 0,!1,void 0,this),a.jsxDEV("span",{className:`text-[10px] px-1.5 py-0.5 rounded ${w.type==="webhook"?"bg-blue-500/10 text-blue-400":"bg-yellow-500/10 text-yellow-400"}`,children:w.type},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},w.slug,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var W=K(Z(),1);function sl(){let[N,b]=Sn.useState("overview");return W.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:W.jsxDEV("div",{className:"max-w-6xl",children:[W.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:W.jsxDEV("div",{children:[W.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Connections"},void 0,!1,void 0,this),W.jsxDEV("p",{className:"text-[#666]",children:"Manage external app connections, triggers, and webhooks."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),W.jsxDEV("div",{className:"flex gap-1 mb-6 bg-[#111] border border-[#1a1a1a] rounded-lg p-1 w-fit",children:[{id:"overview",label:"Overview"},{id:"triggers",label:"Triggers"},{id:"integrations",label:"Integrations"}].map((U)=>W.jsxDEV("button",{onClick:()=>b(U.id),className:`px-4 py-2 rounded text-sm font-medium transition ${N===U.id?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:U.label},U.id,!1,void 0,this))},void 0,!1,void 0,this),N==="overview"&&W.jsxDEV(dn,{},void 0,!1,void 0,this),N==="triggers"&&W.jsxDEV(Tn,{},void 0,!1,void 0,this),N==="integrations"&&W.jsxDEV(un,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}
|
|
2
|
+
export{_l as a,sl as b};
|
|
3
|
+
|
|
4
|
+
//# debugId=805EA685099AB3D564756E2164756E21
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{k as h}from"./App.c90t3dxg.js";import{Q as g,T as A,U as p,W as v,Y as b,aa as x,da as y}from"./App.q3bpx15d.js";var d=g(A(),1);var e=g(p(),1);function I({agents:t,loading:r}){let{currentProjectId:s}=y(),[a,l]=d.useState(null),n=d.useMemo(()=>{if(s===null)return t;if(s==="unassigned")return t.filter((o)=>!o.projectId);return t.filter((o)=>o.projectId===s)},[t,s]),i=n.find((o)=>o.id===a)||null;return e.jsxDEV("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsxDEV("div",{className:"flex-[3] min-h-0 p-6 overflow-auto",children:e.jsxDEV(w,{agents:n,loading:r,selectedAgentId:a,onSelectAgent:l},void 0,!1,void 0,this)},void 0,!1,void 0,this),e.jsxDEV("div",{className:"flex-[2] min-h-0 border-t border-[#1a1a1a] flex",children:[e.jsxDEV($,{agent:i,onClose:()=>l(null)},void 0,!1,void 0,this),e.jsxDEV(S,{agents:n},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function w({agents:t,loading:r,selectedAgentId:s,onSelectAgent:a}){if(r)return e.jsxDEV("div",{className:"flex items-center justify-center h-full text-[#666]",children:"Loading agents..."},void 0,!1,void 0,this);if(t.length===0)return e.jsxDEV("div",{className:"flex items-center justify-center h-full text-[#666]",children:e.jsxDEV("div",{className:"text-center",children:[e.jsxDEV("p",{className:"text-lg",children:"No agents found"},void 0,!1,void 0,this),e.jsxDEV("p",{className:"text-sm text-[#444] mt-1",children:"Create and start agents to see them here"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);let l=t.filter((n)=>n.status==="running").length;return e.jsxDEV("div",{className:"h-full flex flex-col",children:[e.jsxDEV("div",{className:"mb-4 flex items-center justify-between",children:[e.jsxDEV("h2",{className:"text-lg font-semibold",children:"Activity"},void 0,!1,void 0,this),e.jsxDEV("span",{className:"text-sm text-[#666]",children:[l," of ",t.length," running"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),e.jsxDEV("div",{className:"flex-1 flex items-center justify-center",children:e.jsxDEV("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-8",children:t.map((n)=>e.jsxDEV(C,{agent:n,selected:s===n.id,onClick:()=>a(s===n.id?null:n.id)},n.id,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function C({agent:t,selected:r,onClick:s}){let{isActive:a,type:l}=b(t.id),n=t.status==="running",i=r?"ring-2 ring-[#f97316] shadow-[0_0_12px_rgba(249,115,22,0.3)]":n&&a?"ring-2 ring-green-400":n?"ring-1 ring-[#3b82f6]/60":"ring-1 ring-[#333]",o=n?a?"bg-green-500/10":"bg-[#1a1a1a]":"bg-[#111]",c=n?"text-[#e0e0e0]":"text-[#555]";return e.jsxDEV("button",{onClick:s,className:"flex flex-col items-center gap-2 group",children:[e.jsxDEV("div",{className:`w-16 h-16 rounded-full ${o} ${i} flex items-center justify-center transition-all duration-300 group-hover:scale-110 relative`,children:[e.jsxDEV("span",{className:`text-xl font-semibold ${c}`,children:t.name.charAt(0).toUpperCase()},void 0,!1,void 0,this),a&&n&&e.jsxDEV("div",{className:"absolute inset-0 rounded-full bg-green-400/20 animate-ping",style:{animationDuration:"1.5s"}},void 0,!1,void 0,this),n&&a&&e.jsxDEV("div",{className:"absolute inset-0 rounded-full animate-pulse",style:{boxShadow:"0 0 12px 3px rgba(74, 222, 128, 0.4)"}},void 0,!1,void 0,this)]},void 0,!0,void 0,this),e.jsxDEV("div",{className:"text-center max-w-[100px]",children:[e.jsxDEV("p",{className:`text-xs font-medium truncate ${c}`,children:t.name},void 0,!1,void 0,this),a&&l?e.jsxDEV("p",{className:"text-[10px] text-green-400 truncate",children:l},void 0,!1,void 0,this):e.jsxDEV("p",{className:`text-[10px] ${n?"text-[#3b82f6]":"text-[#444]"}`,children:n?"idle":"stopped"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var k={LLM:"bg-purple-500/20 text-purple-400",TOOL:"bg-blue-500/20 text-blue-400",CHAT:"bg-green-500/20 text-green-400",ERROR:"bg-red-500/20 text-red-400",SYSTEM:"bg-gray-500/20 text-gray-400",TASK:"bg-yellow-500/20 text-yellow-400",MEMORY:"bg-cyan-500/20 text-cyan-400",MCP:"bg-orange-500/20 text-orange-400"};function S({agents:t}){let{events:r}=v(),s=d.useRef(null),a=d.useMemo(()=>new Set(t.map((i)=>i.id)),[t]),l=d.useMemo(()=>{let i=new Map;return t.forEach((o)=>i.set(o.id,o.name)),i},[t]),n=d.useMemo(()=>{return r.filter((i)=>a.has(i.agent_id)).slice(0,50)},[r,a]);return e.jsxDEV("div",{className:"flex-1 flex flex-col overflow-hidden border-l border-[#1a1a1a]",children:[e.jsxDEV("div",{className:"px-4 py-3 border-b border-[#1a1a1a] flex items-center justify-between shrink-0",children:[e.jsxDEV("h3",{className:"font-semibold text-sm",children:"Live Activity"},void 0,!1,void 0,this),e.jsxDEV("span",{className:"text-xs text-[#666]",children:[n.length," events"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),e.jsxDEV("div",{ref:s,className:"flex-1 overflow-auto",children:n.length===0?e.jsxDEV("div",{className:"p-4 text-center text-[#666] text-sm",children:"No activity yet. Events appear in real-time."},void 0,!1,void 0,this):e.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:n.map((i)=>e.jsxDEV("div",{className:"px-4 py-2 hover:bg-[#111] transition",style:{animation:"slideIn 0.3s ease-out"},children:[e.jsxDEV("div",{className:"flex items-center gap-2",children:[e.jsxDEV("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-medium ${k[i.category]||"bg-[#222] text-[#888]"}`,children:i.category},void 0,!1,void 0,this),e.jsxDEV("span",{className:"text-xs font-medium truncate flex-1",children:i.type},void 0,!1,void 0,this),e.jsxDEV("span",{className:"text-[10px] text-[#555] shrink-0",children:M(i.timestamp)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),e.jsxDEV("div",{className:"text-[10px] text-[#555] mt-0.5",children:[l.get(i.agent_id)||i.agent_id,i.duration_ms?` · ${i.duration_ms}ms`:""]},void 0,!0,void 0,this)]},i.id,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function $({agent:t,onClose:r}){let{authFetch:s}=x(),[a,l]=d.useState(""),[n,i]=d.useState(!1),[o,c]=d.useState(null);if(d.useEffect(()=>{l(""),c(null)},[t?.id]),!t)return e.jsxDEV("div",{className:"w-80 shrink-0 flex items-center justify-center text-[#555] text-sm p-4 text-center",children:"Click an agent to send a quick command"},void 0,!1,void 0,this);let f=async()=>{if(!a.trim()||n)return;if(t.status!=="running"){c("Agent is not running"),setTimeout(()=>c(null),3000);return}i(!0);try{let m=await s(`/api/agents/${t.id}/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:a,agent_id:t.id})});if(m.ok)c("Command sent"),l("");else{let N=await m.json().catch(()=>({}));c(N.error||"Failed to send")}}catch{c("Failed to send command")}finally{i(!1),setTimeout(()=>c(null),3000)}},u=t.status==="running";return e.jsxDEV("div",{className:"w-80 shrink-0 flex flex-col",children:[e.jsxDEV("div",{className:"px-4 py-3 border-b border-[#1a1a1a] flex items-center justify-between shrink-0",children:[e.jsxDEV("div",{className:"min-w-0",children:[e.jsxDEV("h3",{className:"font-semibold text-sm truncate",children:t.name},void 0,!1,void 0,this),e.jsxDEV("p",{className:`text-[10px] ${u?"text-green-400":"text-[#666]"}`,children:u?"Running":"Stopped"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),e.jsxDEV("button",{onClick:r,className:"text-[#666] hover:text-[#e0e0e0] transition shrink-0 ml-2",children:e.jsxDEV(h,{className:"w-4 h-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),e.jsxDEV("div",{className:"flex-1 p-4 flex flex-col justify-end",children:[o&&e.jsxDEV("div",{className:`mb-3 px-3 py-2 rounded text-xs ${o==="Command sent"?"bg-green-500/10 border border-green-500/20 text-green-400":"bg-red-500/10 border border-red-500/20 text-red-400"}`,children:o},void 0,!1,void 0,this),e.jsxDEV("div",{className:"flex gap-2",children:[e.jsxDEV("input",{type:"text",value:a,onChange:(m)=>l(m.target.value),onKeyDown:(m)=>m.key==="Enter"&&f(),placeholder:u?"Quick command...":"Agent not running",disabled:n||!u,className:"flex-1 bg-[#111] border border-[#1a1a1a] rounded px-3 py-2 text-sm focus:outline-none focus:border-[#f97316] placeholder-[#444] disabled:opacity-50"},void 0,!1,void 0,this),e.jsxDEV("button",{onClick:f,disabled:n||!a.trim()||!u,className:"px-3 py-2 bg-[#f97316]/20 text-[#f97316] rounded text-sm font-medium hover:bg-[#f97316]/30 transition disabled:opacity-30",children:n?"...":"Send"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function M(t){let r=Math.floor((Date.now()-new Date(t).getTime())/1000);if(r<5)return"just now";if(r<60)return`${r}s ago`;let s=Math.floor(r/60);if(s<60)return`${s}m ago`;let a=Math.floor(s/60);if(a<24)return`${a}h ago`;return`${Math.floor(a/24)}d ago`}
|
|
2
|
+
export{I as d};
|
|
3
|
+
|
|
4
|
+
//# debugId=179E59998F7EBC2064756E2164756E21
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{P}from"./App.039re6cf.js";import{Q as N,T as Qq,U as c,W as o,aa as E,da as u}from"./App.q3bpx15d.js";var K=N(Qq(),1);var z=N(c(),1);function i(W){let H=W.category==="LLM",X=W.category==="TOOL",M=W.level==="error",$=W.data?.input_tokens||0,Z=W.data?.output_tokens||0;return{llm_calls:H?1:0,tool_calls:X?1:0,errors:M?1:0,input_tokens:$,output_tokens:Z}}function _q(){let{events:W,statusChangeCounter:H}=o(),{currentProjectId:X,currentProject:M}=u(),{authFetch:$}=E(),[Z,l]=K.useState(null),[C,v]=K.useState([]),[I,d]=K.useState([]),[r,h]=K.useState(!0),[Y,p]=K.useState({level:"",agent_id:""}),[k,n]=K.useState(new Set(["DATABASE"])),[R,a]=K.useState([]),[S,s]=K.useState(null),T=K.useRef(new Set),[t,m]=K.useState(new Set),f=K.useRef(new Set);K.useEffect(()=>{(async()=>{try{let G=await(await $("/api/agents")).json();a(G.agents||[])}catch(B){console.error("Failed to fetch agents:",B)}})()},[$]);let w=K.useMemo(()=>{if(X===null)return R;if(X==="unassigned")return R.filter((q)=>!q.projectId);return R.filter((q)=>q.projectId===X)},[R,X]),V=K.useMemo(()=>new Set(w.map((q)=>q.id)),[w]),g=async()=>{h(!0);try{let q=X==="unassigned"?"null":X||"",B=new URLSearchParams;if(q)B.set("project_id",q);let Q=await(await $(`/api/telemetry/stats${B.toString()?`?${B}`:""}`)).json();l(Q.stats);let J=new URLSearchParams;if(Y.level)J.set("level",Y.level);if(Y.agent_id)J.set("agent_id",Y.agent_id);if(q)J.set("project_id",q);J.set("limit","100");let O=(await(await $(`/api/telemetry/events?${J}`)).json()).events||[];v(O),T.current=new Set(O.map((Kq)=>Kq.id));let b=new URLSearchParams;if(b.set("group_by","agent"),q)b.set("project_id",q);let Jq=await(await $(`/api/telemetry/usage?${b}`)).json();d(Jq.usage||[])}catch(q){console.error("Failed to fetch telemetry:",q)}h(!1)};K.useEffect(()=>{g()},[Y,X,$,H]);let U=K.useMemo(()=>{if(!Z)return null;let q=0,B=0,G=0,Q=0,J=0,A=0;for(let y of W)if(!T.current.has(y.id)){q++;let O=i(y);B+=O.llm_calls,G+=O.tool_calls,Q+=O.errors,J+=O.input_tokens,A+=O.output_tokens}return{total_events:Z.total_events+q,total_llm_calls:Z.total_llm_calls+B,total_tool_calls:Z.total_tool_calls+G,total_errors:Z.total_errors+Q,total_input_tokens:Z.total_input_tokens+J,total_output_tokens:Z.total_output_tokens+A}},[Z,W]),D=K.useMemo(()=>{let q=new Map;for(let B of I)q.set(B.agent_id,{...B});for(let B of W)if(!T.current.has(B.id)){let G=i(B),Q=q.get(B.agent_id);if(Q)Q.llm_calls+=G.llm_calls,Q.tool_calls+=G.tool_calls,Q.errors+=G.errors,Q.input_tokens+=G.input_tokens,Q.output_tokens+=G.output_tokens;else q.set(B.agent_id,{agent_id:B.agent_id,llm_calls:G.llm_calls,tool_calls:G.tool_calls,errors:G.errors,input_tokens:G.input_tokens,output_tokens:G.output_tokens})}return Array.from(q.values())},[I,W]),F=K.default.useMemo(()=>{let q=W;if(X!==null)q=q.filter((J)=>V.has(J.agent_id));if(Y.agent_id)q=q.filter((J)=>J.agent_id===Y.agent_id);if(k.size>0)q=q.filter((J)=>!k.has(J.category));if(Y.level)q=q.filter((J)=>J.level===Y.level);let B=C;if(k.size>0)B=B.filter((J)=>!k.has(J.category));let G=new Set(q.map((J)=>J.id)),Q=[...q];for(let J of B)if(!G.has(J.id))Q.push(J),G.add(J.id);return Q.sort((J,A)=>new Date(A.timestamp).getTime()-new Date(J.timestamp).getTime()),Q.slice(0,100)},[W,C,Y,k,X,V]);K.useEffect(()=>{let q=[];for(let B of W)if(!f.current.has(B.id))f.current.add(B.id),q.push(B.id);if(q.length>0)m((B)=>{let G=new Set(B);return q.forEach((Q)=>G.add(Q)),G}),setTimeout(()=>{m((B)=>{let G=new Set(B);return q.forEach((Q)=>G.delete(Q)),G})},5000)},[W]);let x=(q)=>{return R.find((G)=>G.id===q)?.name||q},_=(q)=>{if(q>=1e6)return(q/1e6).toFixed(1)+"M";if(q>=1000)return(q/1000).toFixed(1)+"K";return q.toString()},e={debug:"text-[#555]",info:"text-blue-400",warn:"text-yellow-400",error:"text-red-400"},j={LLM:"bg-purple-500/20 text-purple-400 border-purple-500/30",TOOL:"bg-blue-500/20 text-blue-400 border-blue-500/30",CHAT:"bg-green-500/20 text-green-400 border-green-500/30",ERROR:"bg-red-500/20 text-red-400 border-red-500/30",SYSTEM:"bg-gray-500/20 text-gray-400 border-gray-500/30",TASK:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30",MEMORY:"bg-cyan-500/20 text-cyan-400 border-cyan-500/30",MCP:"bg-orange-500/20 text-orange-400 border-orange-500/30",DATABASE:"bg-pink-500/20 text-pink-400 border-pink-500/30"},qq=["LLM","TOOL","CHAT","TASK","MEMORY","MCP","SYSTEM","DATABASE","ERROR"],zq=(q)=>{n((B)=>{let G=new Set(B);if(G.has(q))G.delete(q);else G.add(q);return G})},Bq=[{value:"",label:"All Agents"},...w.map((q)=>({value:q.id,label:q.name}))],Gq=[{value:"",label:"All Levels"},{value:"debug",label:"Debug"},{value:"info",label:"Info"},{value:"warn",label:"Warn"},{value:"error",label:"Error"}];return z.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:z.jsxDEV("div",{children:[z.jsxDEV("div",{className:"mb-6",children:[z.jsxDEV("div",{className:"flex items-center gap-3 mb-1",children:[M&&z.jsxDEV("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:M.color}},void 0,!1,void 0,this),z.jsxDEV("h1",{className:"text-2xl font-semibold",children:X===null?"Telemetry":X==="unassigned"?"Telemetry - Unassigned":`Telemetry - ${M?.name||""}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("p",{className:"text-[#666]",children:"Monitor agent activity, token usage, and errors."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U&&z.jsxDEV("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-6",children:[z.jsxDEV(L,{label:"Events",value:_(U.total_events)},void 0,!1,void 0,this),z.jsxDEV(L,{label:"LLM Calls",value:_(U.total_llm_calls)},void 0,!1,void 0,this),z.jsxDEV(L,{label:"Tool Calls",value:_(U.total_tool_calls)},void 0,!1,void 0,this),z.jsxDEV(L,{label:"Errors",value:_(U.total_errors),color:"red"},void 0,!1,void 0,this),z.jsxDEV(L,{label:"Input Tokens",value:_(U.total_input_tokens)},void 0,!1,void 0,this),z.jsxDEV(L,{label:"Output Tokens",value:_(U.total_output_tokens)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),D.length>0&&z.jsxDEV("div",{className:"mb-6",children:[z.jsxDEV("h2",{className:"text-lg font-medium mb-3",children:"Usage by Agent"},void 0,!1,void 0,this),z.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg overflow-hidden",children:z.jsxDEV("table",{className:"w-full text-sm",children:[z.jsxDEV("thead",{children:z.jsxDEV("tr",{className:"border-b border-[#1a1a1a] text-[#666]",children:[z.jsxDEV("th",{className:"text-left p-3",children:"Agent"},void 0,!1,void 0,this),z.jsxDEV("th",{className:"text-right p-3",children:"LLM Calls"},void 0,!1,void 0,this),z.jsxDEV("th",{className:"text-right p-3",children:"Tool Calls"},void 0,!1,void 0,this),z.jsxDEV("th",{className:"text-right p-3",children:"Input Tokens"},void 0,!1,void 0,this),z.jsxDEV("th",{className:"text-right p-3",children:"Output Tokens"},void 0,!1,void 0,this),z.jsxDEV("th",{className:"text-right p-3",children:"Errors"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),z.jsxDEV("tbody",{children:D.map((q)=>z.jsxDEV("tr",{className:"border-b border-[#1a1a1a] last:border-0",children:[z.jsxDEV("td",{className:"p-3 font-medium",children:x(q.agent_id)},void 0,!1,void 0,this),z.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:_(q.llm_calls)},void 0,!1,void 0,this),z.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:_(q.tool_calls)},void 0,!1,void 0,this),z.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:_(q.input_tokens)},void 0,!1,void 0,this),z.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:_(q.output_tokens)},void 0,!1,void 0,this),z.jsxDEV("td",{className:"p-3 text-right",children:q.errors>0?z.jsxDEV("span",{className:"text-red-400",children:q.errors},void 0,!1,void 0,this):z.jsxDEV("span",{className:"text-[#444]",children:"0"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},q.agent_id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[z.jsxDEV("div",{className:"w-44",children:z.jsxDEV(P,{value:Y.agent_id,options:Bq,onChange:(q)=>p({...Y,agent_id:q}),placeholder:"All Agents"},void 0,!1,void 0,this)},void 0,!1,void 0,this),z.jsxDEV("div",{className:"flex flex-wrap items-center gap-1.5 flex-1",children:qq.map((q)=>{let B=k.has(q),G=j[q]||"bg-[#222] text-[#888] border-[#333]";return z.jsxDEV("button",{onClick:()=>zq(q),className:`px-2 py-0.5 rounded text-xs border transition-all ${B?"bg-[#1a1a1a] text-[#555] border-[#333] opacity-50":G}`,children:q},q,!1,void 0,this)})},void 0,!1,void 0,this),z.jsxDEV("div",{className:"flex items-center gap-2",children:[z.jsxDEV("div",{className:"w-36",children:z.jsxDEV(P,{value:Y.level,options:Gq,onChange:(q)=>p({...Y,level:q}),placeholder:"All Levels"},void 0,!1,void 0,this)},void 0,!1,void 0,this),z.jsxDEV("button",{onClick:g,className:"px-3 py-2 bg-[#1a1a1a] hover:bg-[#222] border border-[#333] rounded text-sm transition",children:"Refresh"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg",children:[z.jsxDEV("div",{className:"p-3 border-b border-[#1a1a1a] flex items-center justify-between",children:[z.jsxDEV("h2",{className:"font-medium",children:"Recent Events"},void 0,!1,void 0,this),W.length>0&&z.jsxDEV("span",{className:"text-xs text-[#666]",children:[W.length," new"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),r&&F.length===0?z.jsxDEV("div",{className:"p-8 text-center text-[#666]",children:"Loading..."},void 0,!1,void 0,this):F.length===0?z.jsxDEV("div",{className:"p-8 text-center text-[#666]",children:"No telemetry events yet. Events will appear here in real-time once agents start sending data."},void 0,!1,void 0,this):z.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:F.map((q)=>{let B=t.has(q.id);return z.jsxDEV("div",{className:`p-3 hover:bg-[#0a0a0a] cursor-pointer transition-all duration-500 ${B?"bg-green-500/5":""}`,style:{animation:B?"slideIn 0.3s ease-out":void 0},onClick:()=>s(S===q.id?null:q.id),children:z.jsxDEV("div",{className:"flex items-start gap-3",children:[z.jsxDEV("span",{className:`px-2 py-0.5 rounded text-xs border transition-colors duration-300 ${j[q.category]||"bg-[#222] text-[#888] border-[#333]"}`,children:q.category},void 0,!1,void 0,this),z.jsxDEV("div",{className:"flex-1 min-w-0",children:[z.jsxDEV("div",{className:"flex items-center gap-2",children:[z.jsxDEV("span",{className:"font-medium text-sm",children:q.type},void 0,!1,void 0,this),z.jsxDEV("span",{className:`text-xs ${e[q.level]||"text-[#666]"}`,children:q.level},void 0,!1,void 0,this),q.duration_ms&&z.jsxDEV("span",{className:"text-xs text-[#555]",children:[q.duration_ms,"ms"]},void 0,!0,void 0,this),z.jsxDEV("span",{className:`w-1.5 h-1.5 rounded-full bg-green-400 transition-opacity duration-1000 ${B?"opacity-100":"opacity-0"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"text-xs text-[#555] mt-1",children:[x(q.agent_id)," · ",new Date(q.timestamp).toLocaleString()]},void 0,!0,void 0,this),q.error&&z.jsxDEV("div",{className:"text-xs text-red-400 mt-1 font-mono",children:q.error},void 0,!1,void 0,this),S===q.id&&q.data&&Object.keys(q.data).length>0&&z.jsxDEV("pre",{className:"text-xs text-[#666] mt-2 p-2 bg-[#0a0a0a] rounded overflow-x-auto",children:JSON.stringify(q.data,null,2)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},q.id,!1,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function L({label:W,value:H,color:X}){return z.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[z.jsxDEV("div",{className:"text-[#666] text-xs mb-1",children:W},void 0,!1,void 0,this),z.jsxDEV("div",{className:`text-2xl font-semibold ${X==="red"?"text-red-400":""}`,children:H},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}
|
|
2
|
+
export{_q as O};
|
|
3
|
+
|
|
4
|
+
//# debugId=228D7A9E65268BAC64756E2164756E21
|
package/dist/apteva-kit.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{@keyframes blink{0%,to{opacity:1}50%{opacity:0}}@keyframes slideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate-slideUp{animation:.2s ease-out slideUp}.apteva-scrollbar-hidden{-ms-overflow-style:none;scrollbar-width:none}.apteva-scrollbar-hidden::-webkit-scrollbar{display:none}.apteva-md{white-space:pre-wrap!important;color:inherit!important;word-wrap:break-word!important;overflow-wrap:break-word!important;font-size:.875rem!important;line-height:1.625!important}.apteva-md-h2{all:unset!important;margin-top:.75rem!important;margin-bottom:.25rem!important;font-size:1.125rem!important;font-weight:600!important;line-height:1.3!important;display:block!important}.apteva-md-h3{all:unset!important;margin-top:.5rem!important;margin-bottom:.125rem!important;font-size:1rem!important;font-weight:600!important;line-height:1.3!important;display:block!important}.apteva-md-ul{all:unset!important;margin-top:.5rem!important;margin-bottom:.5rem!important;padding-left:1.5rem!important;list-style-type:disc!important;list-style-position:outside!important;display:block!important}.apteva-md-ol{all:unset!important;margin-top:.5rem!important;margin-bottom:.5rem!important;padding-left:1.5rem!important;list-style-type:decimal!important;list-style-position:outside!important;display:block!important}.apteva-md-li{all:unset!important;margin-bottom:.25rem!important;padding-left:.25rem!important;display:list-item!important}.apteva-tool-call{all:unset!important;background-color:#8080801a!important;border:1px solid #80808033!important;border-radius:.5rem!important;align-items:center!important;gap:.5rem!important;margin:.5rem 0!important;padding:.5rem .75rem!important;font-size:.875rem!important;display:flex!important}.apteva-tool-call-dot{all:unset!important;border-radius:50%!important;flex-shrink:0!important;width:.5rem!important;height:.5rem!important;display:block!important}.apteva-tool-call-dot-running{background-color:#3b82f6!important;animation:1s infinite blink!important}.apteva-tool-call-dot-completed{background-color:#22c55e!important}.apteva-tool-call-dot-error{background-color:#ef4444!important}.apteva-tool-call-name{all:unset!important;color:inherit!important;font-family:ui-monospace,monospace!important}.apteva-tool-call-status{all:unset!important;color:#808080cc!important;margin-left:auto!important}.apteva-tool-call-status-completed{color:#22c55e!important}.apteva-tool-call-status-error{color:#ef4444!important}.apteva-md-table-wrapper{margin:.75rem 0!important;overflow-x:auto!important}.apteva-md-table{border-collapse:collapse!important;width:100%!important;font-size:.8125rem!important;line-height:1.4!important}.apteva-md-th{text-align:left!important;white-space:nowrap!important;border-bottom:2px solid #8080804d!important;padding:.5rem .75rem!important;font-weight:600!important}.apteva-md-td{border-bottom:1px solid #80808026!important;padding:.5rem .75rem!important}.apteva-md-table tbody tr:hover{background-color:#8080800d!important}.apteva-md-table tbody tr:last-child .apteva-md-td{border-bottom:none!important}.apteva-md-img{border-radius:.5rem!important;max-width:100%!important;height:auto!important;margin:.5rem 0!important;display:block!important}.apteva-md-link{color:#3b82f6!important;text-underline-offset:2px!important;text-decoration:underline!important}.apteva-md-link:hover{color:#2563eb!important}.apteva-md-inline-code{background-color:#80808026!important;border-radius:.25rem!important;padding:.125rem .375rem!important;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace!important;font-size:.8125rem!important}.apteva-typing-indicator{align-items:center!important;gap:2px!important;display:inline-flex!important}.apteva-typing-indicator span{opacity:.4!important;background-color:currentColor!important;border-radius:50%!important;width:6px!important;height:6px!important;animation:1.4s infinite both apteva-typing-blink!important}.apteva-typing-indicator span:nth-child(2){animation-delay:.2s!important}.apteva-typing-indicator span:nth-child(3){animation-delay:.4s!important}@keyframes apteva-typing-blink{0%,80%,to{opacity:.4}40%{opacity:1}}.apteva-chat-header{all:unset!important;box-sizing:border-box!important;justify-content:space-between!important;align-items:center!important;padding:.75rem 1rem!important;display:flex!important}.apteva-chat-title{all:unset!important;color:#111827!important;font-size:1.125rem!important;font-weight:600!important;line-height:1.4!important;display:block!important}@media (prefers-color-scheme:dark){.apteva-chat-title{color:#fff!important}}.dark .apteva-chat-title{color:#fff!important}.apteva-chat-status{all:unset!important;margin-top:.125rem!important;font-size:.75rem!important;line-height:1.4!important;display:block!important}.apteva-chat-status-ready,.apteva-chat-status-thinking{color:#737373!important}.apteva-chat-status-tool{color:#3b82f6!important}@media (prefers-color-scheme:dark){.apteva-chat-status-ready,.apteva-chat-status-thinking{color:#525252!important}.apteva-chat-status-tool{color:#60a5fa!important}}.dark .apteva-chat-status-ready,.dark .apteva-chat-status-thinking{color:#525252!important}.dark .apteva-chat-status-tool{color:#60a5fa!important}.apteva-message-list{box-sizing:border-box!important;flex:1!important;padding:1rem!important;display:block!important;overflow-y:auto!important}.apteva-message-row-user{justify-content:flex-end!important;margin-bottom:.75rem!important;display:flex!important}.apteva-message-row-assistant{justify-content:flex-start!important;margin-bottom:.75rem!important;display:flex!important}.apteva-message-bubble{box-sizing:border-box!important;border-radius:1rem!important;max-width:95%!important;padding:.625rem 1rem!important;font-size:.875rem!important;line-height:1.5!important;display:block!important}.apteva-message-user{color:#fff!important;background-color:#2563eb!important;border-bottom-right-radius:.375rem!important}.apteva-message-assistant{color:#0a0a0a!important;background-color:#fafafa!important;border-bottom-left-radius:.375rem!important}@media (prefers-color-scheme:dark){.apteva-message-assistant{color:#fafafa!important;background-color:#262626!important}}.dark .apteva-message-assistant{color:#fafafa!important;background-color:#262626!important}.apteva-message-content-user,.apteva-message-content-assistant{display:block!important}.apteva-message-text{white-space:pre-wrap!important;color:inherit!important;font-size:.875rem!important;line-height:1.625!important;display:block!important}.apteva-message-widgets{margin-top:.5rem!important;display:block!important}.apteva-message-timestamp{margin-top:.375rem!important;font-size:.75rem!important;display:block!important}.apteva-message-timestamp-user{color:#bfdbfe!important}.apteva-message-timestamp-assistant{color:#737373!important}.apteva-message-segmented{flex-direction:column!important;gap:.5rem!important;width:95%!important;max-width:95%!important;display:flex!important}.apteva-message-segmented .apteva-message-bubble{width:fit-content!important;max-width:100%!important}.apteva-tool-call-standalone,.apteva-widget-standalone{display:block!important}.apteva-widget{color:#171717!important;font-family:system-ui,-apple-system,sans-serif!important;font-size:.875rem!important;line-height:1.5!important}.apteva-widget *{box-sizing:border-box!important}.apteva-widget-skeleton{font-family:system-ui,-apple-system,sans-serif!important}.apteva-widget-skeleton *{box-sizing:border-box!important}.apteva-widget-skeleton [class*=bg-neutral-200]{background-color:#e5e5e5!important}.apteva-widget-skeleton [class*=bg-neutral-100]{background-color:#f5f5f5!important}.apteva-widget-skeleton [class*=bg-neutral-300]{background-color:#d4d4d4!important}.apteva-widget-skeleton [class*=border-neutral]{border-color:#e5e5e5!important}@media (prefers-color-scheme:dark){.apteva-widget-skeleton [class*=bg-neutral-700]{background-color:#404040!important}.apteva-widget-skeleton [class*=bg-neutral-800]{background-color:#262626!important}.apteva-widget-skeleton [class*=bg-neutral-600]{background-color:#525252!important}.apteva-widget-skeleton [class*=border-neutral]{border-color:#262626!important}}.dark .apteva-widget-skeleton [class*=bg-neutral-700]{background-color:#404040!important}.dark .apteva-widget-skeleton [class*=bg-neutral-800]{background-color:#262626!important}.dark .apteva-widget-skeleton [class*=bg-neutral-600]{background-color:#525252!important}.dark .apteva-widget-skeleton [class*=border-neutral]{border-color:#262626!important}.apteva-widget>div{background-color:#fff!important}.apteva-widget h3,.apteva-widget h4{color:#171717!important}.apteva-widget p,.apteva-widget span{color:#525252!important}.apteva-widget>div[class*=border]{border-color:#e5e5e5!important}@media (prefers-color-scheme:dark){.apteva-widget{color:#fafafa!important}.apteva-widget>div{background-color:#171717!important}.apteva-widget h3,.apteva-widget h4{color:#fafafa!important}.apteva-widget p,.apteva-widget span{color:#a3a3a3!important}.apteva-widget>div[class*=border]{border-color:#262626!important}}.dark .apteva-widget{color:#fafafa!important}.dark .apteva-widget>div{background-color:#171717!important}.dark .apteva-widget h3,.dark .apteva-widget h4{color:#fafafa!important}.dark .apteva-widget p,.dark .apteva-widget span{color:#a3a3a3!important}.dark .apteva-widget>div[class*=border]{border-color:#262626!important}@media (prefers-color-scheme:dark){.apteva-message-timestamp-assistant{color:#525252!important}}.dark .apteva-message-timestamp-assistant{color:#525252!important}.apteva-tool-card{box-sizing:border-box!important;border-style:solid!important;border-width:1px!important;border-radius:.75rem!important;align-items:center!important;gap:.5rem!important;padding:.5rem .75rem!important;font-size:.875rem!important;display:flex!important}.apteva-tool-card-running{color:#1d4ed8!important;background-color:#eff6ff!important;border-color:#bfdbfe!important}.apteva-tool-card-completed{color:#15803d!important;background-color:#f0fdf4!important;border-color:#bbf7d0!important}.apteva-tool-card-error{color:#b91c1c!important;background-color:#fef2f2!important;border-color:#fecaca!important}@media (prefers-color-scheme:dark){.apteva-tool-card-running{color:#60a5fa!important;background-color:#3b82f61a!important;border-color:#3b82f64d!important}.apteva-tool-card-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.apteva-tool-card-error{color:#f87171!important;background-color:#ef44441a!important;border-color:#ef44444d!important}}.dark .apteva-tool-card-running{color:#60a5fa!important;background-color:#3b82f61a!important;border-color:#3b82f64d!important}.dark .apteva-tool-card-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.dark .apteva-tool-card-error{color:#f87171!important;background-color:#ef44441a!important;border-color:#ef44444d!important}.apteva-tool-icon{flex-shrink:0!important;width:1rem!important;height:1rem!important}.apteva-tool-icon-spin{animation:1s linear infinite apteva-spin!important}.apteva-tool-spinner-track{opacity:.25!important}.apteva-tool-spinner-fill{opacity:.75!important}.apteva-tool-label{font-size:inherit!important}.apteva-tool-label strong{font-weight:600!important}@keyframes apteva-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.apteva-tool-card-preparing{color:#92400e!important;background-color:#fef3c7!important;border-color:#fcd34d!important}@media (prefers-color-scheme:dark){.apteva-tool-card-preparing{color:#fbbf24!important;background-color:#fbbf2426!important;border-color:#fbbf2466!important}}.dark .apteva-tool-card-preparing{color:#fbbf24!important;background-color:#fbbf2426!important;border-color:#fbbf2466!important}@keyframes apteva-pulse-glow{0%,to{box-shadow:0 0 #fbbf2400}50%{box-shadow:0 0 8px 2px #fbbf2480}}.apteva-tool-receiving{animation:.4s ease-in-out apteva-pulse-glow!important}.apteva-tool-status-text{opacity:.7!important;font-weight:400!important}.apteva-tool-char-count{opacity:.6!important;font-variant-numeric:tabular-nums!important;font-size:.85em!important;font-weight:400!important}.apteva-tool-dots{margin-left:1px!important;display:inline-flex!important}.apteva-tool-dots span{opacity:.3!important;animation:1.4s ease-in-out infinite apteva-dot-pulse!important}.apteva-tool-dots span:first-child{animation-delay:0s!important}.apteva-tool-dots span:nth-child(2){animation-delay:.2s!important}.apteva-tool-dots span:nth-child(3){animation-delay:.4s!important}@keyframes apteva-dot-pulse{0%,60%,to{opacity:.3}30%{opacity:1}}.apteva-tool-stream-separator{opacity:.5!important}.apteva-tool-stream-output{opacity:.85!important;white-space:nowrap!important;text-overflow:ellipsis!important;vertical-align:bottom!important;max-width:300px!important;font-weight:400!important;display:inline-block!important;overflow:hidden!important}.apteva-composer{background-color:#fff!important;border:2px solid #d4d4d4!important;border-radius:1rem!important;gap:.5rem .75rem!important;padding:.5rem .75rem!important;transition:all .3s!important;display:grid!important;position:relative!important}.apteva-composer textarea{color:#171717!important;background-color:#0000!important}.apteva-composer textarea::placeholder{color:#a3a3a3!important}button.apteva-composer-menu-btn{background:0 0!important;border:none!important}.apteva-composer-menu{background-color:#262626!important}.apteva-composer-menu button{color:#fff!important;background-color:#0000!important}.apteva-composer-menu button:hover{background-color:#404040!important}.apteva-composer-send-btn{color:#404040!important;background-color:#fff!important;border:1px solid #d4d4d4!important}.apteva-composer-send-btn svg{stroke:currentColor!important}.apteva-composer-stop-btn{all:unset!important;box-sizing:border-box!important;cursor:pointer!important;color:#dc2626!important;background-color:#fef2f2!important;border:1px solid #f87171!important;border-radius:.5rem!important;flex-shrink:0!important;justify-content:center!important;align-items:center!important;width:2rem!important;height:2rem!important;margin:0!important;padding:0!important;transition:background-color .15s!important;display:flex!important}.apteva-composer-stop-btn:hover{background-color:#fee2e2!important}.apteva-composer-stop-btn svg{fill:currentColor!important;width:14px!important;height:14px!important}@media (prefers-color-scheme:dark){.apteva-composer{background-color:#171717!important;border-color:#404040!important}.apteva-composer textarea{color:#fafafa!important}.apteva-composer textarea::placeholder{color:#525252!important}button.apteva-composer-menu-btn{background:0 0!important}.apteva-composer-send-btn{color:#d4d4d4!important;background-color:#262626!important;border-color:#404040!important}.apteva-composer-stop-btn{color:#f87171!important;background-color:#7f1d1d4d!important;border-color:#f87171!important}.apteva-composer-stop-btn:hover{background-color:#7f1d1d80!important}}.dark .apteva-composer{background-color:#171717!important;border-color:#404040!important}.dark .apteva-composer textarea{color:#fafafa!important}.dark .apteva-composer textarea::placeholder{color:#525252!important}.dark button.apteva-composer-menu-btn{background:0 0!important}.dark .apteva-composer-send-btn{color:#d4d4d4!important;background-color:#262626!important;border-color:#404040!important}.dark .apteva-composer-stop-btn{color:#f87171!important;background-color:#7f1d1d4d!important;border-color:#f87171!important}.dark .apteva-composer-stop-btn:hover{background-color:#7f1d1d80!important}.apteva-composer-textarea{-ms-overflow-style:none!important;scrollbar-width:none!important}.apteva-composer-textarea::-webkit-scrollbar{display:none!important}.apteva-chat{background-color:#fff!important}.apteva-chat-header{background-color:#fff!important;border-color:#e5e5e5!important}.apteva-message-list{background-color:#f5f5f5!important}@media (prefers-color-scheme:dark){.apteva-chat{background-color:#0a0a0a!important}.apteva-chat-header{background-color:#171717!important;border-color:#262626!important}.apteva-message-list{background-color:#0a0a0a!important}}.dark .apteva-chat{background-color:#0a0a0a!important}.dark .apteva-chat-header{background-color:#171717!important;border-color:#262626!important}.dark .apteva-message-list{background-color:#0a0a0a!important}@keyframes apteva-slide-in{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes apteva-highlight-fade{0%{background-color:#3b82f626}to{background-color:#0000}}.apteva-list-item-new,.apteva-table-row-new{animation:.3s ease-out apteva-slide-in,.5s ease-out .3s apteva-highlight-fade!important}.apteva-table-row-new td{background-color:#3b82f61a!important}.apteva-list-streaming,.apteva-table-streaming{border-top:1px dashed #8080804d!important}@media (prefers-color-scheme:dark){.apteva-list-item-new,.apteva-table-row-new{animation:.3s ease-out apteva-slide-in,.5s ease-out .3s apteva-highlight-fade-dark!important}.apteva-table-row-new td{background-color:#3b82f626!important}}.dark .apteva-list-item-new,.dark .apteva-table-row-new{animation:.3s ease-out apteva-slide-in,.5s ease-out .3s apteva-highlight-fade-dark!important}.dark .apteva-table-row-new td{background-color:#3b82f626!important}@keyframes apteva-highlight-fade-dark{0%{background-color:#3b82f633}to{background-color:#0000}}.apteva-chat-minimal{background-color:#0000!important}.apteva-chat-minimal .apteva-chat-header{background-color:#0000!important;border:none!important}.apteva-chat-minimal .apteva-message-list{background-color:#0000!important}.apteva-chat-minimal .apteva-composer{background-color:#0000!important;border:1px solid #80808033!important}.apteva-chat-minimal .apteva-message-assistant{background-color:#80808014!important}.apteva-chat-minimal .apteva-message-user{color:inherit!important;background-color:#3b82f626!important}.apteva-chat-terminal{background-color:#0a0a0a!important;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,monospace!important}.apteva-chat-terminal *{font-family:inherit!important}.apteva-chat-terminal .apteva-chat-header{background-color:#0a0a0a!important;border-color:#1a1a1a!important}.apteva-chat-terminal .apteva-chat-title{color:#e0e0e0!important;font-size:.875rem!important}.apteva-chat-terminal .apteva-chat-status{color:#666!important}.apteva-chat-terminal .apteva-chat-status-tool{color:#f97316!important}.apteva-chat-terminal .apteva-message-list{background-color:#0a0a0a!important}.apteva-chat-terminal .apteva-message-user{color:#e0e0e0!important;background-color:#1a1a1a!important;border-radius:4px!important}.apteva-chat-terminal .apteva-message-assistant{color:#e0e0e0!important;background-color:#111!important;border:1px solid #1a1a1a!important;border-radius:4px!important}.apteva-chat-terminal .apteva-message-timestamp{color:#444!important}.apteva-chat-terminal .apteva-message-timestamp-user{color:#666!important}.apteva-chat-terminal .apteva-composer{background-color:#111!important;border:1px solid #1a1a1a!important;border-radius:4px!important}.apteva-chat-terminal .apteva-composer textarea{color:#e0e0e0!important}.apteva-chat-terminal .apteva-composer textarea::placeholder{color:#666!important}.apteva-chat-terminal .apteva-composer-send-btn{color:#888!important;background-color:#1a1a1a!important;border-color:#333!important}.apteva-chat-terminal .apteva-composer-send-btn:hover{color:#f97316!important;border-color:#f97316!important}.apteva-chat-terminal .apteva-composer-stop-btn{color:#f97316!important;background-color:#f9731626!important;border-color:#f97316!important}.apteva-chat-terminal .apteva-composer-menu-btn{color:#666!important}.apteva-chat-terminal .apteva-composer-menu-btn:hover{color:#f97316!important;background-color:#1a1a1a!important}.apteva-chat-terminal .apteva-tool-card-running{color:#f97316!important;background-color:#f973161a!important;border-color:#f973164d!important}.apteva-chat-terminal .apteva-tool-card-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.apteva-chat-terminal .apteva-tool-card-preparing{color:#f97316!important;background-color:#f973161a!important;border-color:#f973164d!important}.apteva-chat-terminal .apteva-md-link{color:#f97316!important}.apteva-chat-terminal .apteva-md-link:hover{color:#fb923c!important}.apteva-chat-terminal .apteva-md-inline-code{color:#3b82f6!important;background-color:#1a1a1a!important}}
|
|
1
|
+
@layer components{@keyframes blink{0%,to{opacity:1}50%{opacity:0}}@keyframes slideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate-slideUp{animation:.2s ease-out slideUp}.apteva-scrollbar-hidden{-ms-overflow-style:none;scrollbar-width:none}.apteva-scrollbar-hidden::-webkit-scrollbar{display:none}.apteva-md{white-space:pre-wrap!important;color:inherit!important;word-wrap:break-word!important;overflow-wrap:break-word!important;font-size:.875rem!important;line-height:1.625!important}.apteva-md-h2{all:unset!important;margin-top:.75rem!important;margin-bottom:.25rem!important;font-size:1.125rem!important;font-weight:600!important;line-height:1.3!important;display:block!important}.apteva-md-h3{all:unset!important;margin-top:.5rem!important;margin-bottom:.125rem!important;font-size:1rem!important;font-weight:600!important;line-height:1.3!important;display:block!important}.apteva-md-ul{all:unset!important;margin-top:.5rem!important;margin-bottom:.5rem!important;padding-left:1.5rem!important;list-style-type:disc!important;list-style-position:outside!important;display:block!important}.apteva-md-ol{all:unset!important;margin-top:.5rem!important;margin-bottom:.5rem!important;padding-left:1.5rem!important;list-style-type:decimal!important;list-style-position:outside!important;display:block!important}.apteva-md-li{all:unset!important;margin-bottom:.25rem!important;padding-left:.25rem!important;display:list-item!important}.apteva-tool-call{all:unset!important;background-color:#8080801a!important;border:1px solid #80808033!important;border-radius:.5rem!important;align-items:center!important;gap:.5rem!important;margin:.5rem 0!important;padding:.5rem .75rem!important;font-size:.875rem!important;display:flex!important}.apteva-tool-call-dot{all:unset!important;border-radius:50%!important;flex-shrink:0!important;width:.5rem!important;height:.5rem!important;display:block!important}.apteva-tool-call-dot-running{background-color:#3b82f6!important;animation:1s infinite blink!important}.apteva-tool-call-dot-completed{background-color:#22c55e!important}.apteva-tool-call-dot-error{background-color:#ef4444!important}.apteva-tool-call-name{all:unset!important;color:inherit!important;font-family:ui-monospace,monospace!important}.apteva-tool-call-status{all:unset!important;color:#808080cc!important;margin-left:auto!important}.apteva-tool-call-status-completed{color:#22c55e!important}.apteva-tool-call-status-error{color:#ef4444!important}.apteva-md-table-wrapper{margin:.75rem 0!important;overflow-x:auto!important}.apteva-md-table{border-collapse:collapse!important;width:100%!important;font-size:.8125rem!important;line-height:1.4!important}.apteva-md-th{text-align:left!important;white-space:nowrap!important;border-bottom:2px solid #8080804d!important;padding:.5rem .75rem!important;font-weight:600!important}.apteva-md-td{border-bottom:1px solid #80808026!important;padding:.5rem .75rem!important}.apteva-md-table tbody tr:hover{background-color:#8080800d!important}.apteva-md-table tbody tr:last-child .apteva-md-td{border-bottom:none!important}.apteva-md-img{border-radius:.5rem!important;max-width:100%!important;height:auto!important;margin:.5rem 0!important;display:block!important}.apteva-md-link{color:#3b82f6!important;text-underline-offset:2px!important;text-decoration:underline!important}.apteva-md-link:hover{color:#2563eb!important}.apteva-md-inline-code{background-color:#80808026!important;border-radius:.25rem!important;padding:.125rem .375rem!important;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace!important;font-size:.8125rem!important}.apteva-typing-indicator{align-items:center!important;gap:2px!important;display:inline-flex!important}.apteva-typing-indicator span{opacity:.4!important;background-color:currentColor!important;border-radius:50%!important;width:6px!important;height:6px!important;animation:1.4s infinite both apteva-typing-blink!important}.apteva-typing-indicator span:nth-child(2){animation-delay:.2s!important}.apteva-typing-indicator span:nth-child(3){animation-delay:.4s!important}@keyframes apteva-typing-blink{0%,80%,to{opacity:.4}40%{opacity:1}}.apteva-chat-header{all:unset!important;box-sizing:border-box!important;justify-content:space-between!important;align-items:center!important;padding:.75rem 1rem!important;display:flex!important}.apteva-chat-title{all:unset!important;color:#111827!important;font-size:1.125rem!important;font-weight:600!important;line-height:1.4!important;display:block!important}@media (prefers-color-scheme:dark){.apteva-chat-title{color:#fff!important}}.dark .apteva-chat-title{color:#fff!important}.apteva-chat-status{all:unset!important;margin-top:.125rem!important;font-size:.75rem!important;line-height:1.4!important;display:block!important}.apteva-chat-status-ready,.apteva-chat-status-thinking{color:#737373!important}.apteva-chat-status-tool{color:#3b82f6!important}@media (prefers-color-scheme:dark){.apteva-chat-status-ready,.apteva-chat-status-thinking{color:#525252!important}.apteva-chat-status-tool{color:#60a5fa!important}}.dark .apteva-chat-status-ready,.dark .apteva-chat-status-thinking{color:#525252!important}.dark .apteva-chat-status-tool{color:#60a5fa!important}.apteva-message-list{box-sizing:border-box!important;flex:1!important;padding:1rem!important;display:block!important;overflow-y:auto!important}.apteva-message-row-user{justify-content:flex-end!important;margin-bottom:.75rem!important;display:flex!important}.apteva-message-row-assistant{justify-content:flex-start!important;margin-bottom:.75rem!important;display:flex!important}.apteva-message-bubble{box-sizing:border-box!important;border-radius:1rem!important;max-width:95%!important;padding:.625rem 1rem!important;font-size:.875rem!important;line-height:1.5!important;display:block!important}.apteva-message-user{color:#fff!important;background-color:#2563eb!important;border-bottom-right-radius:.375rem!important}.apteva-message-assistant{color:#0a0a0a!important;background-color:#fafafa!important;border-bottom-left-radius:.375rem!important}@media (prefers-color-scheme:dark){.apteva-message-assistant{color:#fafafa!important;background-color:#262626!important}}.dark .apteva-message-assistant{color:#fafafa!important;background-color:#262626!important}.apteva-message-content-user,.apteva-message-content-assistant{display:block!important}.apteva-message-text{white-space:pre-wrap!important;color:inherit!important;font-size:.875rem!important;line-height:1.625!important;display:block!important}.apteva-message-widgets{margin-top:.5rem!important;display:block!important}.apteva-message-timestamp{margin-top:.375rem!important;font-size:.75rem!important;display:block!important}.apteva-message-timestamp-user{color:#bfdbfe!important}.apteva-message-timestamp-assistant{color:#737373!important}.apteva-message-segmented{flex-direction:column!important;gap:.5rem!important;width:95%!important;max-width:95%!important;display:flex!important}.apteva-message-segmented .apteva-message-bubble{width:fit-content!important;max-width:100%!important}.apteva-tool-call-standalone,.apteva-widget-standalone{display:block!important}.apteva-widget{color:#171717!important;font-family:system-ui,-apple-system,sans-serif!important;font-size:.875rem!important;line-height:1.5!important}.apteva-widget *{box-sizing:border-box!important}.apteva-widget-skeleton{font-family:system-ui,-apple-system,sans-serif!important}.apteva-widget-skeleton *{box-sizing:border-box!important}.apteva-widget-skeleton [class*=bg-neutral-200]{background-color:#e5e5e5!important}.apteva-widget-skeleton [class*=bg-neutral-100]{background-color:#f5f5f5!important}.apteva-widget-skeleton [class*=bg-neutral-300]{background-color:#d4d4d4!important}.apteva-widget-skeleton [class*=border-neutral]{border-color:#e5e5e5!important}@media (prefers-color-scheme:dark){.apteva-widget-skeleton [class*=bg-neutral-700]{background-color:#404040!important}.apteva-widget-skeleton [class*=bg-neutral-800]{background-color:#262626!important}.apteva-widget-skeleton [class*=bg-neutral-600]{background-color:#525252!important}.apteva-widget-skeleton [class*=border-neutral]{border-color:#262626!important}}.dark .apteva-widget-skeleton [class*=bg-neutral-700]{background-color:#404040!important}.dark .apteva-widget-skeleton [class*=bg-neutral-800]{background-color:#262626!important}.dark .apteva-widget-skeleton [class*=bg-neutral-600]{background-color:#525252!important}.dark .apteva-widget-skeleton [class*=border-neutral]{border-color:#262626!important}.apteva-widget>div{background-color:#fff!important}.apteva-widget h3,.apteva-widget h4{color:#171717!important}.apteva-widget p,.apteva-widget span{color:#525252!important}.apteva-widget>div[class*=border]{border-color:#e5e5e5!important}@media (prefers-color-scheme:dark){.apteva-widget{color:#fafafa!important}.apteva-widget>div{background-color:#171717!important}.apteva-widget h3,.apteva-widget h4{color:#fafafa!important}.apteva-widget p,.apteva-widget span{color:#a3a3a3!important}.apteva-widget>div[class*=border]{border-color:#262626!important}}.dark .apteva-widget{color:#fafafa!important}.dark .apteva-widget>div{background-color:#171717!important}.dark .apteva-widget h3,.dark .apteva-widget h4{color:#fafafa!important}.dark .apteva-widget p,.dark .apteva-widget span{color:#a3a3a3!important}.dark .apteva-widget>div[class*=border]{border-color:#262626!important}@media (prefers-color-scheme:dark){.apteva-message-timestamp-assistant{color:#525252!important}}.dark .apteva-message-timestamp-assistant{color:#525252!important}.apteva-tool-card{box-sizing:border-box!important;border-style:solid!important;border-width:1px!important;border-radius:.75rem!important;align-items:center!important;gap:.5rem!important;padding:.5rem .75rem!important;font-size:.875rem!important;display:flex!important}.apteva-tool-card-running{color:#1d4ed8!important;background-color:#eff6ff!important;border-color:#bfdbfe!important}.apteva-tool-card-completed{color:#15803d!important;background-color:#f0fdf4!important;border-color:#bbf7d0!important}.apteva-tool-card-error{color:#b91c1c!important;background-color:#fef2f2!important;border-color:#fecaca!important}@media (prefers-color-scheme:dark){.apteva-tool-card-running{color:#60a5fa!important;background-color:#3b82f61a!important;border-color:#3b82f64d!important}.apteva-tool-card-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.apteva-tool-card-error{color:#f87171!important;background-color:#ef44441a!important;border-color:#ef44444d!important}}.dark .apteva-tool-card-running{color:#60a5fa!important;background-color:#3b82f61a!important;border-color:#3b82f64d!important}.dark .apteva-tool-card-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.dark .apteva-tool-card-error{color:#f87171!important;background-color:#ef44441a!important;border-color:#ef44444d!important}.apteva-tool-icon{flex-shrink:0!important;width:1rem!important;height:1rem!important}.apteva-tool-icon-spin{animation:1s linear infinite apteva-spin!important}.apteva-tool-spinner-track{opacity:.25!important}.apteva-tool-spinner-fill{opacity:.75!important}.apteva-tool-label{font-size:inherit!important}.apteva-tool-label strong{font-weight:600!important}@keyframes apteva-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.apteva-tool-card-preparing{color:#92400e!important;background-color:#fef3c7!important;border-color:#fcd34d!important}@media (prefers-color-scheme:dark){.apteva-tool-card-preparing{color:#fbbf24!important;background-color:#fbbf2426!important;border-color:#fbbf2466!important}}.dark .apteva-tool-card-preparing{color:#fbbf24!important;background-color:#fbbf2426!important;border-color:#fbbf2466!important}@keyframes apteva-pulse-glow{0%,to{box-shadow:0 0 #fbbf2400}50%{box-shadow:0 0 8px 2px #fbbf2480}}.apteva-tool-receiving{animation:.4s ease-in-out apteva-pulse-glow!important}.apteva-tool-status-text{opacity:.7!important;font-weight:400!important}.apteva-tool-char-count{opacity:.6!important;font-variant-numeric:tabular-nums!important;font-size:.85em!important;font-weight:400!important}.apteva-tool-dots{margin-left:1px!important;display:inline-flex!important}.apteva-tool-dots span{opacity:.3!important;animation:1.4s ease-in-out infinite apteva-dot-pulse!important}.apteva-tool-dots span:first-child{animation-delay:0s!important}.apteva-tool-dots span:nth-child(2){animation-delay:.2s!important}.apteva-tool-dots span:nth-child(3){animation-delay:.4s!important}@keyframes apteva-dot-pulse{0%,60%,to{opacity:.3}30%{opacity:1}}.apteva-tool-stream-separator{opacity:.5!important}.apteva-tool-stream-output{opacity:.85!important;white-space:nowrap!important;text-overflow:ellipsis!important;vertical-align:bottom!important;max-width:300px!important;font-weight:400!important;display:inline-block!important;overflow:hidden!important}.apteva-composer{background-color:#fff!important;border:2px solid #d4d4d4!important;border-radius:1rem!important;gap:.5rem .75rem!important;padding:.5rem .75rem!important;transition:all .3s!important;display:grid!important;position:relative!important}.apteva-composer textarea{color:#171717!important;background-color:#0000!important}.apteva-composer textarea::placeholder{color:#a3a3a3!important}button.apteva-composer-menu-btn{background:0 0!important;border:none!important}.apteva-composer-menu{background-color:#262626!important}.apteva-composer-menu button{color:#fff!important;background-color:#0000!important}.apteva-composer-menu button:hover{background-color:#404040!important}.apteva-composer-send-btn{color:#404040!important;background-color:#fff!important;border:1px solid #d4d4d4!important}.apteva-composer-send-btn svg{stroke:currentColor!important}.apteva-composer-stop-btn{all:unset!important;box-sizing:border-box!important;cursor:pointer!important;color:#dc2626!important;background-color:#fef2f2!important;border:1px solid #f87171!important;border-radius:.5rem!important;flex-shrink:0!important;justify-content:center!important;align-items:center!important;width:2rem!important;height:2rem!important;margin:0!important;padding:0!important;transition:background-color .15s!important;display:flex!important}.apteva-composer-stop-btn:hover{background-color:#fee2e2!important}.apteva-composer-stop-btn svg{fill:currentColor!important;width:14px!important;height:14px!important}@media (prefers-color-scheme:dark){.apteva-composer{background-color:#171717!important;border-color:#404040!important}.apteva-composer textarea{color:#fafafa!important}.apteva-composer textarea::placeholder{color:#525252!important}button.apteva-composer-menu-btn{background:0 0!important}.apteva-composer-send-btn{color:#d4d4d4!important;background-color:#262626!important;border-color:#404040!important}.apteva-composer-stop-btn{color:#f87171!important;background-color:#7f1d1d4d!important;border-color:#f87171!important}.apteva-composer-stop-btn:hover{background-color:#7f1d1d80!important}}.dark .apteva-composer{background-color:#171717!important;border-color:#404040!important}.dark .apteva-composer textarea{color:#fafafa!important}.dark .apteva-composer textarea::placeholder{color:#525252!important}.dark button.apteva-composer-menu-btn{background:0 0!important}.dark .apteva-composer-send-btn{color:#d4d4d4!important;background-color:#262626!important;border-color:#404040!important}.dark .apteva-composer-stop-btn{color:#f87171!important;background-color:#7f1d1d4d!important;border-color:#f87171!important}.dark .apteva-composer-stop-btn:hover{background-color:#7f1d1d80!important}.apteva-file-preview{flex-wrap:wrap!important;gap:.5rem!important;margin-bottom:.5rem!important;display:flex!important}.apteva-file-item{all:unset!important;box-sizing:border-box!important;background-color:#f5f5f5!important;border:1px solid #e5e5e5!important;border-radius:.5rem!important;align-items:center!important;gap:.5rem!important;padding:.5rem .75rem!important;font-family:system-ui,-apple-system,sans-serif!important;display:flex!important;position:relative!important}.apteva-file-item:hover .apteva-file-remove{opacity:1!important}.apteva-file-thumb{object-fit:cover!important;border-radius:.25rem!important;flex-shrink:0!important;width:2rem!important;height:2rem!important}.apteva-file-icon{color:#737373!important;background-color:#e5e5e5!important;border-radius:.25rem!important;flex-shrink:0!important;justify-content:center!important;align-items:center!important;width:2rem!important;height:2rem!important;display:flex!important}.apteva-file-icon svg{width:1rem!important;height:1rem!important}.apteva-file-info{flex-direction:column!important;min-width:0!important;display:flex!important}.apteva-file-name{color:#404040!important;text-overflow:ellipsis!important;white-space:nowrap!important;max-width:120px!important;font-size:.75rem!important;font-weight:500!important;overflow:hidden!important}.apteva-file-size{color:#737373!important;font-size:.75rem!important}.apteva-file-remove{all:unset!important;box-sizing:border-box!important;color:#fff!important;opacity:0!important;cursor:pointer!important;background-color:#737373!important;border-radius:50%!important;justify-content:center!important;align-items:center!important;width:1.25rem!important;height:1.25rem!important;transition:opacity .15s,background-color .15s!important;display:flex!important;position:absolute!important;top:-.375rem!important;right:-.375rem!important}.apteva-file-remove:hover{background-color:#ef4444!important}.apteva-file-remove svg{width:.75rem!important;height:.75rem!important}.apteva-file-error{all:unset!important;box-sizing:border-box!important;z-index:20!important;background-color:#fef2f2!important;border:1px solid #fecaca!important;border-radius:.5rem!important;margin-bottom:.5rem!important;padding:.75rem!important;position:absolute!important;bottom:100%!important;left:1rem!important;right:1rem!important}.apteva-file-error-content{color:#b91c1c!important;align-items:center!important;gap:.5rem!important;font-size:.875rem!important;display:flex!important}.apteva-file-error-content svg{flex-shrink:0!important;width:1rem!important;height:1rem!important}@media (prefers-color-scheme:dark){.apteva-file-item{background-color:#262626!important;border-color:#404040!important}.apteva-file-icon{color:#a3a3a3!important;background-color:#404040!important}.apteva-file-name{color:#d4d4d4!important}.apteva-file-size{color:#a3a3a3!important}.apteva-file-error{background-color:#7f1d1d4d!important;border-color:#f87171!important}.apteva-file-error-content{color:#fca5a5!important}}.dark .apteva-file-item{background-color:#262626!important;border-color:#404040!important}.dark .apteva-file-icon{color:#a3a3a3!important;background-color:#404040!important}.dark .apteva-file-name{color:#d4d4d4!important}.dark .apteva-file-size{color:#a3a3a3!important}.dark .apteva-file-error{background-color:#7f1d1d4d!important;border-color:#f87171!important}.dark .apteva-file-error-content{color:#fca5a5!important}.apteva-file-badges{flex-shrink:0!important;align-items:center!important;gap:.25rem!important;display:flex!important}.apteva-file-badge{all:unset!important;box-sizing:border-box!important;background-color:#f5f5f5!important;border-radius:.25rem!important;justify-content:center!important;align-items:center!important;width:1.5rem!important;height:1.5rem!important;display:flex!important;position:relative!important;overflow:hidden!important}.apteva-file-badge:hover .apteva-file-badge-remove{opacity:1!important}.apteva-file-badge-img{object-fit:cover!important;width:1.5rem!important;height:1.5rem!important}.apteva-file-badge-icon{color:#737373!important;font-size:.75rem!important}.apteva-file-badge-icon svg{width:1rem!important;height:1rem!important}.apteva-file-badge-remove{all:unset!important;box-sizing:border-box!important;opacity:0!important;cursor:pointer!important;background-color:#00000080!important;justify-content:center!important;align-items:center!important;transition:opacity .15s!important;display:flex!important;position:absolute!important;inset:0!important}.apteva-file-badge-remove svg{color:#fff!important;width:.75rem!important;height:.75rem!important}@media (prefers-color-scheme:dark){.apteva-file-badge{background-color:#262626!important}.apteva-file-badge-icon{color:#a3a3a3!important}}.dark .apteva-file-badge{background-color:#262626!important}.dark .apteva-file-badge-icon{color:#a3a3a3!important}.apteva-composer-textarea{-ms-overflow-style:none!important;scrollbar-width:none!important}.apteva-composer-textarea::-webkit-scrollbar{display:none!important}.apteva-chat{background-color:#fff!important}.apteva-chat-header{background-color:#fff!important;border-color:#e5e5e5!important}.apteva-message-list{background-color:#f5f5f5!important}@media (prefers-color-scheme:dark){.apteva-chat{background-color:#0a0a0a!important}.apteva-chat-header{background-color:#171717!important;border-color:#262626!important}.apteva-message-list{background-color:#0a0a0a!important}}.dark .apteva-chat{background-color:#0a0a0a!important}.dark .apteva-chat-header{background-color:#171717!important;border-color:#262626!important}.dark .apteva-message-list{background-color:#0a0a0a!important}@keyframes apteva-slide-in{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes apteva-highlight-fade{0%{background-color:#3b82f626}to{background-color:#0000}}.apteva-list-item-new,.apteva-table-row-new{animation:.3s ease-out apteva-slide-in,.5s ease-out .3s apteva-highlight-fade!important}.apteva-table-row-new td{background-color:#3b82f61a!important}.apteva-list-streaming,.apteva-table-streaming{border-top:1px dashed #8080804d!important}@media (prefers-color-scheme:dark){.apteva-list-item-new,.apteva-table-row-new{animation:.3s ease-out apteva-slide-in,.5s ease-out .3s apteva-highlight-fade-dark!important}.apteva-table-row-new td{background-color:#3b82f626!important}}.dark .apteva-list-item-new,.dark .apteva-table-row-new{animation:.3s ease-out apteva-slide-in,.5s ease-out .3s apteva-highlight-fade-dark!important}.dark .apteva-table-row-new td{background-color:#3b82f626!important}@keyframes apteva-highlight-fade-dark{0%{background-color:#3b82f633}to{background-color:#0000}}.apteva-chat-minimal{background-color:#0000!important}.apteva-chat-minimal .apteva-chat-header{background-color:#0000!important;border:none!important}.apteva-chat-minimal .apteva-message-list{background-color:#0000!important}.apteva-chat-minimal .apteva-composer{background-color:#0000!important;border:1px solid #80808033!important}.apteva-chat-minimal .apteva-message-assistant{background-color:#80808014!important}.apteva-chat-minimal .apteva-message-user{color:inherit!important;background-color:#3b82f626!important}.apteva-chat-terminal{background-color:#0a0a0a!important;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,monospace!important}.apteva-chat-terminal *{font-family:inherit!important}.apteva-chat-terminal .apteva-chat-header{background-color:#0a0a0a!important;border-color:#1a1a1a!important}.apteva-chat-terminal .apteva-chat-title{color:#e0e0e0!important;font-size:.875rem!important}.apteva-chat-terminal .apteva-chat-status{color:#666!important}.apteva-chat-terminal .apteva-chat-status-tool{color:#f97316!important}.apteva-chat-terminal .apteva-message-list{background-color:#0a0a0a!important}.apteva-chat-terminal .apteva-message-user{color:#e0e0e0!important;background-color:#1a1a1a!important;border-radius:4px!important}.apteva-chat-terminal .apteva-message-assistant{color:#e0e0e0!important;background-color:#111!important;border:1px solid #1a1a1a!important;border-radius:4px!important}.apteva-chat-terminal .apteva-message-timestamp{color:#444!important}.apteva-chat-terminal .apteva-message-timestamp-user{color:#666!important}.apteva-chat-terminal .apteva-composer{background-color:#111!important;border:1px solid #1a1a1a!important;border-radius:4px!important}.apteva-chat-terminal .apteva-composer textarea{color:#e0e0e0!important}.apteva-chat-terminal .apteva-composer textarea::placeholder{color:#666!important}.apteva-chat-terminal .apteva-composer-send-btn{color:#888!important;background-color:#1a1a1a!important;border-color:#333!important}.apteva-chat-terminal .apteva-composer-send-btn:hover{color:#f97316!important;border-color:#f97316!important}.apteva-chat-terminal .apteva-composer-stop-btn{color:#f97316!important;background-color:#f9731626!important;border-color:#f97316!important}.apteva-chat-terminal .apteva-composer-menu-btn{color:#666!important}.apteva-chat-terminal .apteva-composer-menu-btn:hover{color:#f97316!important;background-color:#1a1a1a!important}.apteva-chat-terminal .apteva-tool-card-running{color:#f97316!important;background-color:#f973161a!important;border-color:#f973164d!important}.apteva-chat-terminal .apteva-tool-card-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.apteva-chat-terminal .apteva-tool-card-preparing{color:#f97316!important;background-color:#f973161a!important;border-color:#f973164d!important}.apteva-chat-terminal .apteva-md-link{color:#f97316!important}.apteva-chat-terminal .apteva-md-link:hover{color:#fb923c!important}.apteva-chat-terminal .apteva-md-inline-code{color:#3b82f6!important;background-color:#1a1a1a!important}}
|