@apteva/apteva-darwin-arm64 0.4.52 → 0.4.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/apteva +0 -0
  2. package/dist/ActivityPage.nx7edj1s.js +3 -0
  3. package/dist/{ActivityPage.9v5ha2p7.js.map → ActivityPage.nx7edj1s.js.map} +2 -2
  4. package/dist/ApiDocsPage.rwys8wpd.js +4 -0
  5. package/dist/{ApiDocsPage.qsehxvkb.js.map → ApiDocsPage.rwys8wpd.js.map} +2 -2
  6. package/dist/App.2j4tpeys.js +61 -0
  7. package/dist/{App.anvw0hjc.js.map → App.2j4tpeys.js.map} +3 -3
  8. package/dist/{App.jdkx6eqd.js → App.8cvz3ngj.js} +2 -2
  9. package/dist/{App.jdkx6eqd.js.map → App.8cvz3ngj.js.map} +1 -1
  10. package/dist/App.a2rb0ne3.js +4 -0
  11. package/dist/{App.sd685nt9.js.map → App.a2rb0ne3.js.map} +2 -2
  12. package/dist/App.aybz4ae0.js +53 -0
  13. package/dist/{App.d9vcm6zs.js.map → App.aybz4ae0.js.map} +3 -3
  14. package/dist/App.bjefj5zs.js +4 -0
  15. package/dist/{App.aexwv4rk.js.map → App.bjefj5zs.js.map} +2 -2
  16. package/dist/App.cnbb1872.js +4 -0
  17. package/dist/{App.x6x8s16g.js.map → App.cnbb1872.js.map} +2 -2
  18. package/dist/App.cv6e5yds.js +4 -0
  19. package/dist/App.cv6e5yds.js.map +10 -0
  20. package/dist/App.eqd061d2.js +4 -0
  21. package/dist/{App.dmvykj97.js.map → App.eqd061d2.js.map} +3 -3
  22. package/dist/App.fy5bef1p.js +20 -0
  23. package/dist/{App.shfd8tp9.js.map → App.fy5bef1p.js.map} +6 -5
  24. package/dist/App.mxcz65n1.js +4 -0
  25. package/dist/{App.cjcyr5aj.js.map → App.mxcz65n1.js.map} +2 -2
  26. package/dist/App.nvpvg5yh.js +13 -0
  27. package/dist/{App.j4ec9k18.js.map → App.nvpvg5yh.js.map} +2 -2
  28. package/dist/{App.2j20h2gt.js → App.rvnjekh6.js} +3 -3
  29. package/dist/{App.2j20h2gt.js.map → App.rvnjekh6.js.map} +2 -2
  30. package/dist/App.was53rtk.js +4 -0
  31. package/dist/{App.kz3qyyre.js.map → App.was53rtk.js.map} +2 -2
  32. package/dist/App.wqjbggrj.js +4 -0
  33. package/dist/{App.e2kkda2a.js.map → App.wqjbggrj.js.map} +2 -2
  34. package/dist/App.z92hp4k3.js +221 -0
  35. package/dist/{App.j0xwtdd7.js.map → App.z92hp4k3.js.map} +11 -11
  36. package/dist/{App.wghtdzsk.js → App.zn4mw16t.js} +1 -1
  37. package/dist/ConnectionsPage.qfyks0xm.js +3 -0
  38. package/dist/McpPage.y6vgt9ej.js +3 -0
  39. package/dist/SettingsPage.fkw8berr.js +3 -0
  40. package/dist/SkillsPage.48zztx44.js +3 -0
  41. package/dist/TasksPage.v930en79.js +3 -0
  42. package/dist/TelemetryPage.xxebs3s9.js +3 -0
  43. package/dist/TelemetryPage.xxebs3s9.js.map +9 -0
  44. package/dist/TestsPage.1xtfmbrg.js +3 -0
  45. package/dist/ThreadsPage.xazwab60.js +3 -0
  46. package/dist/ThreadsPage.xazwab60.js.map +9 -0
  47. package/dist/apteva-kit.css +1 -1
  48. package/dist/index.html +1 -1
  49. package/dist/styles.css +1 -1
  50. package/package.json +1 -1
  51. package/dist/ActivityPage.9v5ha2p7.js +0 -3
  52. package/dist/ApiDocsPage.qsehxvkb.js +0 -4
  53. package/dist/App.2md3x3z7.js +0 -4
  54. package/dist/App.2md3x3z7.js.map +0 -10
  55. package/dist/App.aexwv4rk.js +0 -4
  56. package/dist/App.anvw0hjc.js +0 -61
  57. package/dist/App.cjcyr5aj.js +0 -4
  58. package/dist/App.d9vcm6zs.js +0 -53
  59. package/dist/App.dmvykj97.js +0 -4
  60. package/dist/App.e2kkda2a.js +0 -4
  61. package/dist/App.j0xwtdd7.js +0 -221
  62. package/dist/App.j4ec9k18.js +0 -13
  63. package/dist/App.kz3qyyre.js +0 -4
  64. package/dist/App.sd685nt9.js +0 -4
  65. package/dist/App.shfd8tp9.js +0 -20
  66. package/dist/App.x6x8s16g.js +0 -4
  67. package/dist/ConnectionsPage.1dyyfqbk.js +0 -3
  68. package/dist/McpPage.xvr8hk05.js +0 -3
  69. package/dist/SettingsPage.4r1nbxvp.js +0 -3
  70. package/dist/SkillsPage.jw7carjq.js +0 -3
  71. package/dist/TasksPage.r8txe0e9.js +0 -3
  72. package/dist/TelemetryPage.sqnsfrht.js +0 -3
  73. package/dist/TelemetryPage.sqnsfrht.js.map +0 -9
  74. package/dist/TestsPage.pkymr7yt.js +0 -3
  75. package/dist/ThreadsPage.49tgq4fq.js +0 -3
  76. package/dist/ThreadsPage.49tgq4fq.js.map +0 -9
  77. /package/dist/{ConnectionsPage.1dyyfqbk.js.map → ConnectionsPage.qfyks0xm.js.map} +0 -0
  78. /package/dist/{McpPage.xvr8hk05.js.map → McpPage.y6vgt9ej.js.map} +0 -0
  79. /package/dist/{SettingsPage.4r1nbxvp.js.map → SettingsPage.fkw8berr.js.map} +0 -0
  80. /package/dist/{SkillsPage.jw7carjq.js.map → SkillsPage.48zztx44.js.map} +0 -0
  81. /package/dist/{TasksPage.r8txe0e9.js.map → TasksPage.v930en79.js.map} +0 -0
  82. /package/dist/{TestsPage.pkymr7yt.js.map → TestsPage.1xtfmbrg.js.map} +0 -0
@@ -1,4 +0,0 @@
1
- import{O as V}from"./App.e2kkda2a.js";import{U as D}from"./App.sd685nt9.js";import{$ as Kk,X as P,aa as v,da as i,ja as o,ma as d}from"./App.shfd8tp9.js";var J=P(Kk(),1);var q=P(v(),1);function Yk(){let{authFetch:K}=o(),{currentProjectId:X}=d(),{confirm:j,ConfirmDialog:E}=V(),[$,x]=J.useState([]),[A,c]=J.useState([]),[a,u]=J.useState(!0),[r,Y]=J.useState(!1),[H,C]=J.useState(null),[T,Q]=J.useState(new Set),[F,R]=J.useState(!1),[y,I]=J.useState(null),[w,f]=J.useState(null),[S,U]=J.useState({}),[M,N]=J.useState(""),[b,L]=J.useState(""),[g,B]=J.useState(""),Z=X&&X!=="all"&&X!=="unassigned"?X:null,n=Z?A.filter((k)=>k.projectId===Z):A,{events:p}=i({category:"test",limit:50}),_=J.useRef(new Set);J.useEffect(()=>{for(let k of p){if(_.current.has(k.id))continue;_.current.add(k.id);let z=k.data?.test_case_id;if(!z)continue;if(k.type==="test_started")U((G)=>({...G,[z]:{phase:"starting"}})),Q((G)=>new Set(G).add(z));else if(k.type==="test_planning")U((G)=>({...G,[z]:{phase:"planning"}}));else if(k.type==="test_executing"){let G=k.data?.agent_name;U((O)=>({...O,[z]:{phase:"executing",detail:G}}))}else if(k.type==="test_judging")U((G)=>({...G,[z]:{phase:"judging"}}));else if(k.type==="test_completed")U((G)=>{let O={...G};return delete O[z],O}),Q((G)=>{let O=new Set(G);return O.delete(z),O}),W()}if(_.current.size>500)_.current=new Set([..._.current].slice(-200))},[p]);let W=async()=>{try{let k=Z?`?project_id=${Z}`:"",z=await K(`/api/tests${k}`);if(z.ok)x(await z.json())}catch{}u(!1)},s=async()=>{try{let k=await K("/api/agents");if(k.ok){let z=await k.json();c((z.agents||z).map((G)=>({id:G.id,name:G.name,status:G.status,provider:G.provider,model:G.model,projectId:G.projectId||null})))}}catch{}};J.useEffect(()=>{Promise.all([W(),s()])},[X]);let l=()=>{C(null),N(""),L(""),B(""),Y(!0)},t=(k)=>{C(k),N(k.name),L(k.behavior||""),B(k.agent_id||""),Y(!0)},e=async()=>{if(!M||!b)return;let k={name:M,behavior:b,agent_id:g||null,project_id:Z||void 0};if(H)await K(`/api/tests/${H.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)});else await K("/api/tests",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)});Y(!1),W()},kk=async(k)=>{if(!await j("Delete this test case? Run history will also be deleted."))return;await K(`/api/tests/${k}`,{method:"DELETE"}),W()},qk=async(k)=>{Q((z)=>new Set(z).add(k));try{await K(`/api/tests/${k}/run`,{method:"POST"}),await W()}catch{}Q((z)=>{let G=new Set(z);return G.delete(k),G}),U((z)=>{let G={...z};return delete G[k],G})},zk=async()=>{R(!0);try{let k=$.map((z)=>z.id);Q(new Set(k)),await K("/api/tests/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({test_case_ids:k})}),await W()}catch{}Q(new Set),R(!1)},Gk=async(k)=>{try{let z=await K(`/api/tests/${k}/runs`);if(z.ok)I({testId:k,runs:await z.json()})}catch{}},h={starting:{label:"Starting",color:"bg-blue-900/50 text-blue-400 border-blue-500/30"},planning:{label:"Planning",color:"bg-purple-900/50 text-purple-400 border-purple-500/30"},executing:{label:"Executing",color:"bg-cyan-900/50 text-cyan-400 border-cyan-500/30"},judging:{label:"Judging",color:"bg-amber-900/50 text-amber-400 border-amber-500/30"}},m=(k)=>{return q.jsxDEV("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${{passed:"bg-green-900/50 text-green-400",failed:"bg-red-900/50 text-red-400",error:"bg-yellow-900/50 text-yellow-400",running:"bg-blue-900/50 text-blue-400"}[k]||"bg-[var(--color-surface-raised)] text-[var(--color-text-muted)]"}`,children:k.toUpperCase()},void 0,!1,void 0,this)},Jk=(k)=>{let z=S[k];if(!z)return null;let G=h[z.phase]||h.starting;return q.jsxDEV("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded text-xs font-medium border ${G.color} animate-pulse`,children:[q.jsxDEV("span",{className:"w-1.5 h-1.5 rounded-full bg-current"},void 0,!1,void 0,this),G.label,z.detail?` · ${z.detail}`:""]},void 0,!0,void 0,this)};return q.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[E,q.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[q.jsxDEV("div",{children:[q.jsxDEV("h1",{className:"text-xl font-bold",children:"Tests"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:"Describe behavior, AI handles the rest"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{className:"flex gap-2",children:[$.length>0&&q.jsxDEV("button",{onClick:zk,disabled:F,className:"px-4 py-2 bg-[var(--color-surface-raised)] hover:bg-[var(--color-surface-raised)] text-[var(--color-text)] rounded text-sm font-medium transition disabled:opacity-50",children:F?"Running...":"Run All"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:l,className:"px-4 py-2 bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] text-white rounded text-sm font-medium transition",children:"+ New Test"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),a?q.jsxDEV("div",{className:"text-[var(--color-text-muted)] text-sm",children:"Loading..."},void 0,!1,void 0,this):$.length===0?q.jsxDEV("div",{className:"text-center py-16",children:[q.jsxDEV("div",{className:"text-[var(--color-border-light)] text-4xl mb-4",children:q.jsxDEV("svg",{className:"w-12 h-12 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:q.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-[var(--color-text-muted)] mb-2",children:"No tests yet"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-xs text-[var(--color-text-faint)] mb-4",children:"Describe what your agents should do and let AI verify it"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:l,className:"px-4 py-2 bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] text-white rounded text-sm font-medium transition",children:"Create your first test"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):q.jsxDEV("div",{className:"space-y-3",children:$.map((k)=>q.jsxDEV("div",{className:"bg-[var(--color-surface)] card p-4",children:q.jsxDEV("div",{className:"flex items-start justify-between",children:[q.jsxDEV("div",{className:"flex-1 min-w-0",children:[q.jsxDEV("div",{className:"flex items-center gap-2 mb-1",children:[q.jsxDEV("span",{className:"font-medium text-sm",children:k.name},void 0,!1,void 0,this),S[k.id]?Jk(k.id):k.last_run&&q.jsxDEV(q.Fragment,{children:[m(k.last_run.status),k.last_run.score!=null&&q.jsxDEV("span",{className:"text-xs text-[var(--color-text-secondary)] font-mono",children:[k.last_run.score,"/10"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k.behavior&&q.jsxDEV("p",{className:"text-xs text-[var(--color-text-secondary)] mb-1.5 line-clamp-2",children:k.behavior},void 0,!1,void 0,this),q.jsxDEV("div",{className:"text-xs text-[var(--color-text-muted)] space-y-0.5",children:[q.jsxDEV("div",{children:["Agent:"," ",q.jsxDEV("span",{className:"text-[var(--color-text-secondary)]",children:k.agent_name||(k.last_run?.selected_agent_name?`${k.last_run.selected_agent_name} (auto-selected)`:"Auto (AI picks)")},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k.last_run?.generated_message&&q.jsxDEV("div",{className:"truncate",children:["Message: ",q.jsxDEV("span",{className:"text-[var(--color-text-secondary)]",children:['"',k.last_run.generated_message,'"']},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k.input_message&&!k.last_run?.generated_message&&q.jsxDEV("div",{className:"truncate",children:["Message: ",q.jsxDEV("span",{className:"text-[var(--color-text-secondary)]",children:['"',k.input_message,'"']},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k.last_run&&q.jsxDEV("div",{children:["Last run:"," ",q.jsxDEV("span",{className:"text-[var(--color-text-secondary)]",children:[k.last_run.duration_ms?`${(k.last_run.duration_ms/1000).toFixed(1)}s`:"---",k.last_run.judge_reasoning&&` --- "${k.last_run.judge_reasoning.slice(0,80)}${k.last_run.judge_reasoning.length>80?"...":""}"`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{className:"flex items-center gap-1 ml-3 shrink-0",children:[q.jsxDEV("button",{onClick:()=>Gk(k.id),className:"px-2 py-1 text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-raised)] rounded transition",title:"View run history",children:"History"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:()=>qk(k.id),disabled:T.has(k.id),className:"px-3 py-1 text-xs bg-[var(--color-surface-raised)] hover:bg-[var(--color-surface-raised)] text-[var(--color-text)] rounded transition disabled:opacity-50",children:T.has(k.id)?"Running...":"Run"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:()=>t(k),className:"px-2 py-1 text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-raised)] rounded transition",children:"Edit"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:()=>kk(k.id),className:"px-2 py-1 text-xs text-[var(--color-text-muted)] hover:text-red-400 hover:bg-[var(--color-surface-raised)] rounded transition",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},k.id,!1,void 0,this))},void 0,!1,void 0,this),y&&q.jsxDEV("div",{className:"mt-6",children:[q.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[q.jsxDEV("h2",{className:"text-sm font-bold text-[var(--color-text-secondary)]",children:"Run History"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:()=>{I(null),f(null)},className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)]",children:"Close"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y.runs.length===0?q.jsxDEV("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No runs yet"},void 0,!1,void 0,this):q.jsxDEV("div",{className:"space-y-2",children:y.runs.map((k)=>q.jsxDEV("div",{className:"bg-[var(--color-bg-secondary)] border border-[var(--color-border)] rounded p-3",children:[q.jsxDEV("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>f(w===k.id?null:k.id),children:[q.jsxDEV("div",{className:"flex items-center gap-3",children:[m(k.status),q.jsxDEV("span",{className:"text-xs text-[var(--color-text-muted)]",children:k.duration_ms?`${(k.duration_ms/1000).toFixed(1)}s`:"---"},void 0,!1,void 0,this),k.score!=null&&q.jsxDEV("span",{className:"text-xs text-[var(--color-text-secondary)] font-mono",children:[k.score,"/10"]},void 0,!0,void 0,this),k.selected_agent_name&&q.jsxDEV("span",{className:"text-xs text-[var(--color-text-faint)]",children:["Agent: ",k.selected_agent_name]},void 0,!0,void 0,this),q.jsxDEV("span",{className:"text-xs text-[var(--color-text-faint)]",children:new Date(k.created_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("span",{className:"text-xs text-[var(--color-text-faint)]",children:w===k.id?"---":"+"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w===k.id&&q.jsxDEV("div",{className:"mt-3 space-y-2",children:[k.planner_reasoning&&q.jsxDEV("div",{children:[q.jsxDEV("div",{className:"text-xs text-[var(--color-text-muted)] mb-1",children:"Planner:"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"text-sm text-[var(--color-text-secondary)] bg-[var(--color-bg)] p-2 rounded",children:[k.selected_agent_name&&q.jsxDEV("span",{className:"text-[var(--color-accent)]",children:k.selected_agent_name},void 0,!1,void 0,this),k.selected_agent_name&&" --- ",k.planner_reasoning]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k.generated_message&&q.jsxDEV("div",{children:[q.jsxDEV("div",{className:"text-xs text-[var(--color-text-muted)] mb-1",children:"Generated Message:"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"text-sm text-[var(--color-text-secondary)] bg-[var(--color-bg)] p-2 rounded",children:['"',k.generated_message,'"']},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k.judge_reasoning&&q.jsxDEV("div",{children:[q.jsxDEV("div",{className:"text-xs text-[var(--color-text-muted)] mb-1",children:"Judge:"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"text-sm text-[var(--color-text-secondary)] bg-[var(--color-bg)] p-2 rounded",children:k.judge_reasoning},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k.error&&q.jsxDEV("div",{children:[q.jsxDEV("div",{className:"text-xs text-red-400 mb-1",children:"Error:"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"text-sm text-red-300 bg-[var(--color-bg)] p-2 rounded",children:k.error},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k.agent_response&&q.jsxDEV("div",{children:[q.jsxDEV("div",{className:"text-xs text-[var(--color-text-muted)] mb-1",children:"Agent Response (Thread):"},void 0,!1,void 0,this),q.jsxDEV("pre",{className:"text-xs text-[var(--color-text-secondary)] bg-[var(--color-bg)] p-2 rounded overflow-auto max-h-64",children:k.agent_response},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},k.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),r&&q.jsxDEV("div",{className:"fixed inset-0 bg-black/60 z-50 flex items-center justify-center",onClick:()=>Y(!1),children:q.jsxDEV("div",{className:"bg-[var(--color-surface)] card w-full max-w-lg mx-4 p-6",onClick:(k)=>k.stopPropagation(),children:[q.jsxDEV("h2",{className:"text-lg font-bold mb-4",children:H?"Edit Test":"New Test"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"space-y-4",children:[q.jsxDEV("div",{children:[q.jsxDEV("label",{className:"block text-xs text-[var(--color-text-muted)] mb-1",children:"Name"},void 0,!1,void 0,this),q.jsxDEV("input",{value:M,onChange:(k)=>N(k.target.value),placeholder:"e.g. Social Media Posting",className:"w-full bg-[var(--color-bg)] border border-[var(--color-border-light)] rounded px-3 py-2 text-sm focus:outline-none focus:border-[var(--color-accent)]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{children:[q.jsxDEV("label",{className:"block text-xs text-[var(--color-text-muted)] mb-1",children:"Behavior"},void 0,!1,void 0,this),q.jsxDEV("textarea",{value:b,onChange:(k)=>L(k.target.value),placeholder:"Describe what should happen, e.g. 'When asked to post on social media, the agent creates a proper post with relevant hashtags and confirms it was published'",rows:3,className:"w-full bg-[var(--color-bg)] border border-[var(--color-border-light)] rounded px-3 py-2 text-sm focus:outline-none focus:border-[var(--color-accent)] resize-none"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-xs text-[var(--color-text-faint)] mt-1",children:"AI will generate the test message and evaluate results based on this"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{children:[q.jsxDEV("label",{className:"block text-xs text-[var(--color-text-muted)] mb-1",children:"Agent"},void 0,!1,void 0,this),q.jsxDEV(D,{value:g,onChange:B,placeholder:"Auto (AI picks the best agent)",options:n.map((k)=>({value:k.id,label:`${k.name} (${k.status})`}))},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-xs text-[var(--color-text-faint)] mt-1",children:"Leave empty to let AI choose the right agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{className:"flex justify-end gap-2 mt-6",children:[q.jsxDEV("button",{onClick:()=>Y(!1),className:"px-4 py-2 text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-text)] transition",children:"Cancel"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:e,disabled:!M||!b,className:"px-4 py-2 bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] disabled:opacity-50 text-white rounded text-sm font-medium transition",children:H?"Save":"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)]},void 0,!0,void 0,this)}
2
- export{Yk as M};
3
-
4
- //# debugId=2D14C6A7BC29E53364756E2164756E21
@@ -1,4 +0,0 @@
1
- import{$ as P,X as L,aa as N}from"./App.shfd8tp9.js";var z=L(P(),1),w=L(N(),1);function U({children:q,onClose:y}){return w.jsxDEV("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:w.jsxDEV("div",{className:"bg-[var(--color-surface)] card p-6 w-full max-w-xl lg:max-w-2xl max-h-[90vh] overflow-y-auto",children:q},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function Q({title:q,message:y,confirmText:F="Confirm",cancelText:B="Cancel",confirmVariant:G="danger",onConfirm:I,onCancel:J}){return w.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:w.jsxDEV("div",{className:"bg-[var(--color-surface)] card p-6 w-full max-w-sm",children:[q&&w.jsxDEV("h3",{className:"font-medium mb-2",children:q},void 0,!1,void 0,this),w.jsxDEV("p",{className:"text-sm text-[var(--color-text)] mb-4",children:y},void 0,!1,void 0,this),w.jsxDEV("div",{className:"flex gap-2",children:[w.jsxDEV("button",{onClick:J,className:"flex-1 text-sm bg-[var(--color-surface-raised)] hover:bg-[var(--color-surface-raised)] border border-[var(--color-border-light)] btn px-4 py-2 transition",children:B},void 0,!1,void 0,this),w.jsxDEV("button",{onClick:I,className:`flex-1 text-sm text-white px-4 py-2 btn transition ${G==="danger"?"bg-red-500 hover:bg-red-600":"bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)]"}`,children:F},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 R({title:q,message:y,buttonText:F="OK",variant:B="info",onClose:G}){let I={error:"bg-red-500/20 text-red-400",success:"bg-green-500/20 text-green-400",info:"bg-blue-500/20 text-blue-400"},J={error:"✕",success:"✓",info:"ℹ"};return w.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:w.jsxDEV("div",{className:"bg-[var(--color-surface)] card p-6 w-full max-w-sm text-center",children:[w.jsxDEV("div",{className:`w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-3 ${I[B]}`,children:w.jsxDEV("span",{className:"text-xl",children:J[B]},void 0,!1,void 0,this)},void 0,!1,void 0,this),q&&w.jsxDEV("h3",{className:"font-medium mb-2",children:q},void 0,!1,void 0,this),w.jsxDEV("p",{className:"text-sm text-[var(--color-text)] mb-4",children:y},void 0,!1,void 0,this),w.jsxDEV("button",{onClick:G,className:"w-full text-sm bg-[var(--color-surface-raised)] hover:bg-[var(--color-surface-raised)] border border-[var(--color-border-light)] px-4 py-2 btn transition",children:F},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function W(){let[q,y]=z.useState(null),F=z.useCallback((J,K={})=>{return new Promise((O)=>{y({message:J,options:K,resolve:O})})},[]),B=z.useCallback(()=>{q?.resolve(!0),y(null)},[q]),G=z.useCallback(()=>{q?.resolve(!1),y(null)},[q]),I=q?w.jsxDEV(Q,{title:q.options.title,message:q.message,confirmText:q.options.confirmText,cancelText:q.options.cancelText,confirmVariant:q.options.confirmVariant,onConfirm:B,onCancel:G},void 0,!1,void 0,this):null;return{confirm:F,ConfirmDialog:I}}function X(){let[q,y]=z.useState(null),F=z.useCallback((I,J={})=>{return new Promise((K)=>{y({message:I,options:J,resolve:K})})},[]),B=z.useCallback(()=>{q?.resolve(),y(null)},[q]),G=q?w.jsxDEV(R,{title:q.options.title,message:q.message,buttonText:q.options.buttonText,variant:q.options.variant,onClose:B},void 0,!1,void 0,this):null;return{alert:F,AlertDialog:G}}
2
- export{U as N,W as O,X as P};
3
-
4
- //# debugId=47B6BB0942493C6364756E2164756E21