agent-relay 1.0.19 → 1.0.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/dashboard/out/404.html +1 -1
- package/dist/dashboard/out/_next/static/chunks/app/{page-967d136fefe19b95.js → page-28a7722e809c2573.js} +1 -1
- package/dist/dashboard/out/index.html +1 -1
- package/dist/dashboard/out/index.txt +2 -2
- package/dist/dashboard/out/metrics.html +1 -1
- package/dist/dashboard/out/metrics.txt +1 -1
- package/package.json +1 -1
- /package/dist/dashboard/out/_next/static/{8DVul-dljS-l8n_DJCHcG → 15pBupHgVjgmNaba43jnO}/_buildManifest.js +0 -0
- /package/dist/dashboard/out/_next/static/{8DVul-dljS-l8n_DJCHcG → 15pBupHgVjgmNaba43jnO}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/34bb8e70353694d8.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-c81f7fd28659d64f.js"/><script src="/_next/static/chunks/fd9d1056-26bd8d656b496dba.js" async=""></script><script src="/_next/static/chunks/117-3bef7b19f3e60751.js" async=""></script><script src="/_next/static/chunks/main-app-bae2e535de00de50.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Agent Relay Dashboard</title><meta name="description" content="Fleet control dashboard for Agent Relay"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-c81f7fd28659d64f.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/34bb8e70353694d8.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[2846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[6423,[],\"\"]\nb:I[1060,[],\"\"]\n6:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n7:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n8:{\"display\":\"inline-block\"}\n9:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nc:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/34bb8e70353694d8.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-c81f7fd28659d64f.js"/><script src="/_next/static/chunks/fd9d1056-26bd8d656b496dba.js" async=""></script><script src="/_next/static/chunks/117-3bef7b19f3e60751.js" async=""></script><script src="/_next/static/chunks/main-app-bae2e535de00de50.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Agent Relay Dashboard</title><meta name="description" content="Fleet control dashboard for Agent Relay"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-c81f7fd28659d64f.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/34bb8e70353694d8.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[2846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[6423,[],\"\"]\nb:I[1060,[],\"\"]\n6:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n7:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n8:{\"display\":\"inline-block\"}\n9:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nc:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"15pBupHgVjgmNaba43jnO\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/34bb8e70353694d8.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$6\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$7\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$8\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$9\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$La\"],\"globalErrorComponent\":\"$b\",\"missingSlots\":\"$Wc\"}]\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Agent Relay Dashboard\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Fleet control dashboard for Agent Relay\"}]]\n3:null\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{8440:function(e,n,t){Promise.resolve().then(t.bind(t,546))},546:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return ey}});var s=t(7437),a=t(2265);let l={backend:{primary:"#1264a3",light:"#e8f4fd",dark:"#0d4f82",text:"#ffffff"},frontend:{primary:"#7c3aed",light:"#f3e8ff",dark:"#5b21b6",text:"#ffffff"},infra:{primary:"#ea580c",light:"#fff7ed",dark:"#c2410c",text:"#ffffff"},lead:{primary:"#2bac76",light:"#ecfdf5",dark:"#059669",text:"#ffffff"},test:{primary:"#0d9488",light:"#f0fdfa",dark:"#0f766e",text:"#ffffff"},data:{primary:"#dc2626",light:"#fef2f2",dark:"#b91c1c",text:"#ffffff"},api:{primary:"#2563eb",light:"#eff6ff",dark:"#1d4ed8",text:"#ffffff"},worker:{primary:"#9333ea",light:"#faf5ff",dark:"#7e22ce",text:"#ffffff"},monitor:{primary:"#0891b2",light:"#ecfeff",dark:"#0e7490",text:"#ffffff"},security:{primary:"#be123c",light:"#fff1f2",dark:"#9f1239",text:"#ffffff"}},r=[{primary:"#6366f1",light:"#eef2ff",dark:"#4f46e5",text:"#ffffff"},{primary:"#ec4899",light:"#fdf2f8",dark:"#db2777",text:"#ffffff"},{primary:"#14b8a6",light:"#f0fdfa",dark:"#0d9488",text:"#ffffff"},{primary:"#f59e0b",light:"#fffbeb",dark:"#d97706",text:"#000000"},{primary:"#8b5cf6",light:"#f5f3ff",dark:"#7c3aed",text:"#ffffff"},{primary:"#06b6d4",light:"#ecfeff",dark:"#0891b2",text:"#ffffff"},{primary:"#f43f5e",light:"#fff1f2",dark:"#e11d48",text:"#ffffff"},{primary:"#84cc16",light:"#f7fee7",dark:"#65a30d",text:"#000000"}],i={online:"#22c55e",offline:"#6b7280",busy:"#eab308",processing:"#6366f1",error:"#ef4444",attention:"#ef4444"};function c(e){return e.toLowerCase().split("-").filter(Boolean)}function o(e){return c(e)[0]||e.toLowerCase()}function d(e){let n=o(e);return n in l?l[n]:r[function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n&=n;return Math.abs(n)}(n)%r.length]}function u(e){let n=c(e);return 0===n.length?e.substring(0,2).toUpperCase():n.length>=2?(n[0][0]+n[1][0]).toUpperCase():n[0].substring(0,2).toUpperCase()}function m(e){let n=new Map;for(let t of e){let e=o(t.name),s=d(t.name),a=n.get(e);a||(a={prefix:e,displayName:g(e),color:s,agents:[],isExpanded:!0},n.set(e,a)),a.agents.push(t)}let t=Array.from(n.values()).sort((e,n)=>e.prefix.localeCompare(n.prefix));for(let e of t)e.agents.sort((e,n)=>e.name.localeCompare(n.name));return t}function h(e){return e.split("-").filter(Boolean).map(g).join(" > ")}function x(e,n){return n?e.filter(e=>(function(e,n){if(!n)return!0;let t=n.toLowerCase(),s=e.toLowerCase();return!!s.includes(t)||s.split("-").some(e=>e.includes(t))})(e.name,n)):e}function g(e){return e?e.charAt(0).toUpperCase()+e.slice(1):e}function p(e){let n=0,t=0,s=0;for(let a of e)"online"===a.status?n++:"offline"===a.status&&t++,a.needsAttention&&s++;return{total:e.length,online:n,offline:t,needsAttention:s}}function f(e){let{isProcessing:n,processingStartedAt:t,size:l="medium",showElapsed:r=!1}=e,[i,c]=(0,a.useState)(0);return((0,a.useEffect)(()=>{if(!n||!t){c(0);return}let e=()=>{c(Date.now()-t)};e();let s=setInterval(e,1e3);return()=>clearInterval(s)},[n,t]),n)?(0,s.jsxs)("div",{className:"thinking-indicator ".concat({small:"thinking-indicator-small",medium:"thinking-indicator-medium",large:"thinking-indicator-large"}[l]),children:[(0,s.jsxs)("div",{className:"thinking-dots",children:[(0,s.jsx)("span",{className:"thinking-dot"}),(0,s.jsx)("span",{className:"thinking-dot"}),(0,s.jsx)("span",{className:"thinking-dot"})]}),r&&i>0&&(0,s.jsx)("span",{className:"thinking-elapsed",children:(e=>{let n=Math.floor(e/1e3);return n<60?"".concat(n,"s"):"".concat(Math.floor(n/60),"m ").concat(n%60,"s")})(i)})]}):null}function j(e){let{isProcessing:n}=e;return n?(0,s.jsx)("span",{className:"thinking-dot-inline",title:"Processing...",children:(0,s.jsx)("span",{className:"thinking-dot-pulse"})}):null}function y(e){let{agent:n,isSelected:t=!1,showBreadcrumb:a=!1,compact:l=!1,onClick:r,onMessageClick:c,onReleaseClick:o}=e,m=d(n.name),x=u(n.name),p=function(e){let n=e.split("-").filter(Boolean);return 0===n.length?e:g(n[n.length-1])}(n.name),y=i[n.status]||i.offline,w=()=>{null==r||r(n)},b=e=>{e.stopPropagation(),null==o||o(n)};return l?(0,s.jsxs)("div",{className:"agent-card-compact ".concat(t?"selected":""),onClick:w,style:{"--agent-primary":m.primary,"--agent-light":m.light},children:[(0,s.jsx)("div",{className:"agent-avatar-small",style:{backgroundColor:m.primary},children:(0,s.jsx)("span",{style:{color:m.text},children:x})}),(0,s.jsxs)("div",{className:"agent-compact-info",children:[(0,s.jsx)("span",{className:"agent-name",children:p}),(0,s.jsx)("span",{className:"agent-breadcrumb-compact",children:h(n.name)})]}),(0,s.jsxs)("div",{className:"agent-compact-actions",children:[n.isSpawned&&o&&(0,s.jsx)("button",{className:"release-btn-compact",onClick:b,title:"Kill agent",children:(0,s.jsx)(k,{})}),n.isProcessing?(0,s.jsx)(j,{isProcessing:!0}):(0,s.jsx)("div",{className:"agent-status-dot",style:{backgroundColor:y}}),n.needsAttention&&(0,s.jsx)("div",{className:"attention-badge"})]})]}):(0,s.jsxs)("div",{className:"agent-card ".concat(t?"selected":""),onClick:w,style:{"--agent-primary":m.primary,"--agent-light":m.light,"--agent-dark":m.dark},children:[(0,s.jsxs)("div",{className:"agent-card-header",children:[(0,s.jsxs)("div",{className:"agent-avatar",style:{backgroundColor:m.primary},children:[(0,s.jsx)("span",{style:{color:m.text},children:x}),(0,s.jsx)("div",{className:"status-indicator",style:{backgroundColor:y}})]}),(0,s.jsxs)("div",{className:"agent-info",children:[(0,s.jsxs)("div",{className:"agent-name-row",children:[(0,s.jsx)("span",{className:"agent-display-name",children:p}),n.needsAttention&&(0,s.jsx)("span",{className:"attention-badge",title:"Needs attention",children:"!"})]}),a?(0,s.jsx)("span",{className:"agent-breadcrumb",children:h(n.name)}):(0,s.jsx)("span",{className:"agent-full-name",children:n.name})]})]}),n.isProcessing&&(0,s.jsxs)("div",{className:"agent-thinking",children:[(0,s.jsx)(f,{isProcessing:!0,processingStartedAt:n.processingStartedAt,size:"medium",showElapsed:!0}),(0,s.jsx)("span",{className:"thinking-label",children:"Thinking..."})]}),n.currentTask&&!n.isProcessing&&(0,s.jsxs)("div",{className:"agent-task",children:[(0,s.jsx)("span",{className:"task-label",children:"Working on:"}),(0,s.jsx)("span",{className:"task-text",children:n.currentTask})]}),(0,s.jsxs)("div",{className:"agent-card-footer",children:[(0,s.jsxs)("div",{className:"agent-meta",children:[n.cli&&(0,s.jsx)("span",{className:"agent-cli",children:n.cli}),void 0!==n.messageCount&&n.messageCount>0&&(0,s.jsxs)("span",{className:"message-count",children:[n.messageCount," msgs"]}),n.isSpawned&&(0,s.jsx)("span",{className:"agent-spawned-badge",children:"spawned"})]}),(0,s.jsxs)("div",{className:"agent-actions",children:[n.isSpawned&&o&&(0,s.jsx)("button",{className:"release-btn",onClick:b,title:"Release agent",children:(0,s.jsx)(k,{})}),c&&(0,s.jsx)("button",{className:"message-btn",onClick:e=>{e.stopPropagation(),null==c||c(n)},title:"Send message",children:(0,s.jsx)(v,{})})]})]})]})}function v(){return(0,s.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,s.jsx)("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function k(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,s.jsx)("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),(0,s.jsx)("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]})}function w(e){let{agents:n,selectedAgent:t,searchQuery:l="",onAgentSelect:r,onAgentMessage:i,onReleaseClick:c,compact:o=!1,showGroupStats:d=!0}=e,[u,h]=(0,a.useState)(new Set),[g,p]=(0,a.useState)(!0),f=(0,a.useMemo)(()=>x(n,l),[n,l]),j=(0,a.useMemo)(()=>m(f),[f]);(0,a.useMemo)(()=>{0===u.size&&j.length>0&&h(new Set(j.map(e=>e.prefix)))},[j]);let y=e=>{h(n=>{let t=new Set(n);return t.has(e)?t.delete(e):t.add(e),t})};return 0===n.length?(0,s.jsxs)("div",{className:"agent-list-empty",children:[(0,s.jsx)(C,{}),(0,s.jsx)("p",{children:"No agents connected"})]}):0===f.length?(0,s.jsxs)("div",{className:"agent-list-empty",children:[(0,s.jsx)(S,{}),(0,s.jsxs)("p",{children:['No agents match "',l,'"']})]}):(0,s.jsxs)("div",{className:"agent-list",children:[j.length>1&&(0,s.jsxs)("div",{className:"agent-list-header",children:[(0,s.jsxs)("span",{className:"agent-count",children:[f.length," agents"]}),(0,s.jsx)("button",{className:"toggle-all-btn",onClick:()=>{g?h(new Set):h(new Set(j.map(e=>e.prefix))),p(!g)},children:g?"Collapse all":"Expand all"})]}),j.map(e=>(0,s.jsx)(b,{group:e,isExpanded:u.has(e.prefix),selectedAgent:t,compact:o,showStats:d,onToggle:()=>y(e.prefix),onAgentSelect:r,onAgentMessage:i,onReleaseClick:c},e.prefix))]})}function b(e){let{group:n,isExpanded:t,selectedAgent:a,compact:l,showStats:r,onToggle:c,onAgentSelect:o,onAgentMessage:d,onReleaseClick:u}=e,m=r?p(n.agents):null;return(0,s.jsxs)("div",{className:"agent-group",children:[(0,s.jsxs)("button",{className:"agent-group-header",onClick:c,style:{"--group-color":n.color.primary,"--group-light":n.color.light},children:[(0,s.jsx)("div",{className:"group-color-bar"}),(0,s.jsx)(N,{expanded:t}),(0,s.jsx)("span",{className:"group-name",children:n.displayName}),(0,s.jsxs)("span",{className:"group-count",children:["(",n.agents.length,")"]}),r&&m&&(0,s.jsxs)("div",{className:"group-stats",children:[m.online>0&&(0,s.jsxs)("span",{className:"stat online",children:[(0,s.jsx)("span",{className:"stat-dot",style:{backgroundColor:i.online}}),m.online]}),m.needsAttention>0&&(0,s.jsxs)("span",{className:"stat attention",children:[(0,s.jsx)("span",{className:"stat-dot",style:{backgroundColor:i.attention}}),m.needsAttention]})]})]}),t&&(0,s.jsx)("div",{className:"agent-group-content",children:n.agents.map(e=>(0,s.jsx)(y,{agent:e,isSelected:e.name===a,compact:l,onClick:o,onMessageClick:d,onReleaseClick:u},e.name))})]})}function N(e){let{expanded:n}=e;return(0,s.jsx)("svg",{className:"chevron-icon ".concat(n?"expanded":""),width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,s.jsx)("polyline",{points:"9 18 15 12 9 6"})})}function C(){return(0,s.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",children:[(0,s.jsx)("circle",{cx:"12",cy:"8",r:"5"}),(0,s.jsx)("path",{d:"M20 21a8 8 0 1 0-16 0"})]})}function S(){return(0,s.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",children:[(0,s.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,s.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}function A(e){let{agents:n,selectedAgent:t,viewMode:l,isFleetAvailable:r,isConnected:i,onAgentSelect:c,onViewModeChange:o,onSpawnClick:d,onReleaseClick:u}=e,[m,h]=(0,a.useState)("");return(0,s.jsxs)("aside",{className:"sidebar",children:[(0,s.jsxs)("div",{className:"sidebar-header",children:[(0,s.jsxs)("div",{className:"sidebar-title",children:[(0,s.jsx)("h1",{children:"Agent Relay"}),(0,s.jsx)(M,{isConnected:i})]}),r&&(0,s.jsxs)("div",{className:"view-mode-toggle",children:[(0,s.jsx)("button",{className:"toggle-btn ".concat("local"===l?"active":""),onClick:()=>null==o?void 0:o("local"),children:"Local"}),(0,s.jsx)("button",{className:"toggle-btn ".concat("fleet"===l?"active":""),onClick:()=>null==o?void 0:o("fleet"),children:"Fleet"})]})]}),(0,s.jsxs)("div",{className:"sidebar-search",children:[(0,s.jsx)(D,{}),(0,s.jsx)("input",{type:"text",placeholder:"Search agents...",value:m,onChange:e=>h(e.target.value)}),m&&(0,s.jsx)("button",{className:"clear-btn",onClick:()=>h(""),children:(0,s.jsx)(E,{})})]}),(0,s.jsx)("div",{className:"sidebar-content",children:(0,s.jsx)(w,{agents:n,selectedAgent:t,searchQuery:m,onAgentSelect:c,onReleaseClick:u,compact:!0,showGroupStats:!0})}),(0,s.jsxs)("div",{className:"sidebar-footer",children:[(0,s.jsxs)("a",{href:"/metrics",className:"nav-link metrics-link",children:[(0,s.jsx)(W,{}),(0,s.jsx)("span",{children:"Metrics"})]}),(0,s.jsxs)("button",{className:"spawn-btn",onClick:d,children:[(0,s.jsx)(B,{}),"Spawn Agent"]})]})]})}function M(e){let{isConnected:n}=e;return(0,s.jsx)("div",{className:"connection-indicator ".concat(n?"connected":"disconnected"),title:n?"Connected":"Disconnected"})}function D(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,s.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}function E(){return(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,s.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function B(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,s.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function W(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("path",{d:"M3 3v18h18"}),(0,s.jsx)("path",{d:"M18 17V9"}),(0,s.jsx)("path",{d:"M13 17V5"}),(0,s.jsx)("path",{d:"M8 17v-3"})]})}function L(e){let{currentChannel:n,selectedAgent:t,onCommandPaletteOpen:a,onSettingsClick:l}=e,r="general"===n,i=t?d(t.name):null;return(0,s.jsxs)("header",{className:"header",children:[(0,s.jsx)("div",{className:"header-left",children:r?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"channel-prefix",children:"#"}),(0,s.jsx)("span",{className:"channel-name",children:"general"}),(0,s.jsx)("span",{className:"channel-topic",children:"All agent communications"})]}):t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"agent-avatar-small",style:{backgroundColor:null==i?void 0:i.primary},children:(0,s.jsx)("span",{style:{color:null==i?void 0:i.text},children:u(t.name)})}),(0,s.jsxs)("div",{className:"channel-info",children:[(0,s.jsx)("span",{className:"channel-name",children:t.name}),(0,s.jsx)("span",{className:"channel-breadcrumb",children:h(t.name)})]}),t.status&&(0,s.jsx)("span",{className:"agent-status-badge",children:t.status})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"channel-prefix",children:"@"}),(0,s.jsx)("span",{className:"channel-name",children:n})]})}),(0,s.jsxs)("div",{className:"header-right",children:[(0,s.jsxs)("button",{className:"header-btn command-palette-btn",onClick:a,title:"Command Palette (⌘K)",children:[(0,s.jsx)(R,{}),(0,s.jsx)("span",{children:"Search"}),(0,s.jsx)("kbd",{children:"⌘K"})]}),(0,s.jsx)("button",{className:"header-btn icon-btn",onClick:l,title:"Settings",children:(0,s.jsx)(T,{})})]})]})}function R(){return(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,s.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}function T(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,s.jsx)("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"})]})}function F(e){let{messages:n,currentChannel:t,onThreadClick:l,highlightedMessageId:r}=e,i=(0,a.useRef)(null),c=(0,a.useRef)(null);(0,a.useEffect)(()=>{var e;null===(e=c.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})},[n.length]);let o=n.filter(e=>"general"===t?"*"===e.to||e.isBroadcast:e.from===t||e.to===t);return 0===o.length?(0,s.jsxs)("div",{className:"message-list-empty",children:[(0,s.jsx)(P,{}),(0,s.jsx)("h3",{children:"No messages yet"}),(0,s.jsx)("p",{children:"general"===t?"Broadcast messages will appear here":"Messages with ".concat(t," will appear here")})]}):(0,s.jsxs)("div",{className:"message-list",ref:i,children:[o.map(e=>(0,s.jsx)(O,{message:e,isHighlighted:e.id===r,onThreadClick:l},e.id)),(0,s.jsx)("div",{ref:c})]})}function O(e){let{message:n,isHighlighted:t,onThreadClick:l}=e,r=d(n.from),i=function(e){let n=new Date(e),t=new Date;if(n.toDateString()===t.toDateString())return n.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});let s=new Date(t);return(s.setDate(s.getDate()-1),n.toDateString()===s.toDateString())?"Yesterday ".concat(n.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):n.toLocaleDateString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}(n.timestamp);return(0,s.jsxs)("div",{className:"message-item ".concat(t?"highlighted":""),children:[(0,s.jsx)("div",{className:"message-avatar",style:{backgroundColor:r.primary},children:(0,s.jsx)("span",{style:{color:r.text},children:u(n.from)})}),(0,s.jsxs)("div",{className:"message-content",children:[(0,s.jsxs)("div",{className:"message-header",children:[(0,s.jsx)("span",{className:"message-sender",children:n.from}),"*"!==n.to&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"message-arrow",children:"→"}),(0,s.jsx)("span",{className:"message-recipient",children:n.to})]}),(0,s.jsx)("span",{className:"message-time",children:i}),"*"===n.to&&(0,s.jsx)("span",{className:"message-badge broadcast",children:"broadcast"})]}),(0,s.jsx)("div",{className:"message-body",children:n.content.replace(/\\n/g,"\n").replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n").map((e,n)=>(0,s.jsxs)(a.Fragment,{children:[n>0&&(0,s.jsx)("br",{}),function(e){let n=/(https?:\/\/[^\s]+)/g;return e.split(n).map((e,t)=>n.test(e)?(0,s.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"message-link",children:e},t):e)}(e)]},n))}),n.replyCount&&n.replyCount>0&&(0,s.jsxs)("button",{className:"message-thread-btn",onClick:()=>null==l?void 0:l(n.id),children:[(0,s.jsx)(V,{}),(0,s.jsxs)("span",{children:[n.replyCount," ",1===n.replyCount?"reply":"replies"]})]})]})]})}function P(){return(0,s.jsx)("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,s.jsx)("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function V(){return(0,s.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,s.jsx)("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function I(e){let{isOpen:n,onClose:t,agents:l,onAgentSelect:r,onSpawnClick:i,onSettingsClick:c,onGeneralClick:o,customCommands:d=[]}=e,[u,m]=(0,a.useState)(""),[h,x]=(0,a.useState)(0),g=(0,a.useRef)(null),p=(0,a.useRef)(null),f=(0,a.useMemo)(()=>[...l.map(e=>({id:"agent-".concat(e.name),label:e.name,description:e.currentTask||e.status,category:"agents",icon:(0,s.jsx)(z,{name:e.name}),action:()=>{r(e),t()}})),{id:"spawn-agent",label:"Spawn Agent",description:"Launch a new agent instance",category:"actions",icon:(0,s.jsx)(K,{}),shortcut:"⌘⇧S",action:()=>{i(),t()}},{id:"broadcast",label:"Broadcast Message",description:"Send message to all agents",category:"actions",icon:(0,s.jsx)(U,{}),action:()=>{t()}},{id:"nav-general",label:"Go to #general",description:"View all broadcast messages",category:"navigation",icon:(0,s.jsx)(_,{}),action:()=>{null==o||o(),t()}},...c?[{id:"settings",label:"Settings",description:"Configure dashboard preferences",category:"settings",icon:(0,s.jsx)(q,{}),shortcut:"⌘,",action:()=>{c(),t()}}]:[],...d],[l,r,i,c,o,t,d]),j=(0,a.useMemo)(()=>{if(!u.trim())return f;let e=u.toLowerCase();return f.filter(n=>{var t;return n.label.toLowerCase().includes(e)||(null===(t=n.description)||void 0===t?void 0:t.toLowerCase().includes(e))||n.category.toLowerCase().includes(e)})},[f,u]),y=(0,a.useMemo)(()=>{let e={};for(let n of j)e[n.category]||(e[n.category]=[]),e[n.category].push(n);return e},[j]),v=(0,a.useMemo)(()=>["agents","actions","navigation","settings"].flatMap(e=>y[e]||[]),[y]);(0,a.useEffect)(()=>{x(0)},[u]),(0,a.useEffect)(()=>{n&&(m(""),x(0),setTimeout(()=>{var e;return null===(e=g.current)||void 0===e?void 0:e.focus()},0))},[n]),(0,a.useEffect)(()=>{if(p.current&&v.length>0){let e=p.current.querySelector('[data-index="'.concat(h,'"]'));null==e||e.scrollIntoView({block:"nearest"})}},[h,v.length]);let k=(0,a.useCallback)(e=>{switch(e.key){case"ArrowDown":e.preventDefault(),x(e=>Math.min(e+1,v.length-1));break;case"ArrowUp":e.preventDefault(),x(e=>Math.max(e-1,0));break;case"Enter":e.preventDefault(),v[h]&&v[h].action();break;case"Escape":e.preventDefault(),t()}},[v,h,t]);if(!n)return null;let w={agents:"Agents",actions:"Actions",navigation:"Navigation",settings:"Settings"},b=0;return(0,s.jsx)("div",{className:"command-palette-overlay",onClick:t,children:(0,s.jsxs)("div",{className:"command-palette",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"command-palette-input-wrapper",children:[(0,s.jsx)(H,{}),(0,s.jsx)("input",{ref:g,type:"text",className:"command-palette-input",placeholder:"Search commands, agents...",value:u,onChange:e=>m(e.target.value),onKeyDown:k}),(0,s.jsx)("kbd",{className:"command-palette-kbd",children:"ESC"})]}),(0,s.jsx)("div",{className:"command-palette-list",ref:p,children:0===v.length?(0,s.jsxs)("div",{className:"command-palette-empty",children:['No results for "',u,'"']}):Object.entries(y).map(e=>{let[n,t]=e;return t.length?(0,s.jsxs)("div",{className:"command-palette-group",children:[(0,s.jsx)("div",{className:"command-palette-group-label",children:w[n]||n}),t.map(e=>{let n=b++;return(0,s.jsxs)("button",{"data-index":n,className:"command-palette-item ".concat(n===h?"selected":""),onClick:e.action,onMouseEnter:()=>x(n),children:[(0,s.jsx)("span",{className:"command-palette-item-icon",children:e.icon}),(0,s.jsxs)("span",{className:"command-palette-item-content",children:[(0,s.jsx)("span",{className:"command-palette-item-label",children:e.label}),e.description&&(0,s.jsx)("span",{className:"command-palette-item-desc",children:e.description})]}),e.shortcut&&(0,s.jsx)("kbd",{className:"command-palette-item-shortcut",children:e.shortcut})]},e.id)})]},n):null})})]})})}function z(e){let{name:n}=e,t=d(n);return(0,s.jsx)("div",{className:"command-palette-agent-icon",style:{backgroundColor:t.primary,color:t.text},children:u(n)})}function H(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,s.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}function K(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,s.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function U(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"2"}),(0,s.jsx)("path",{d:"M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49m11.31-2.82a10 10 0 0 1 0 14.14m-14.14 0a10 10 0 0 1 0-14.14"})]})}function _(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("line",{x1:"4",y1:"9",x2:"20",y2:"9"}),(0,s.jsx)("line",{x1:"4",y1:"15",x2:"20",y2:"15"}),(0,s.jsx)("line",{x1:"10",y1:"3",x2:"8",y2:"21"}),(0,s.jsx)("line",{x1:"16",y1:"3",x2:"14",y2:"21"})]})}function q(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,s.jsx)("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"})]})}let J=[{id:"claude",name:"Claude",command:"claude",description:"Claude Code CLI agent",icon:"\uD83E\uDD16"},{id:"codex",name:"Codex",command:"codex",description:"OpenAI Codex agent",icon:"⚡"},{id:"custom",name:"Custom",command:"",description:"Custom command",icon:"\uD83D\uDD27"}],G=["frontend","backend","lead","test","docs","review","deploy","data"];function Z(e){let{isOpen:n,onClose:t,onSpawn:l,existingAgents:r,isSpawning:i=!1,error:c}=e,[o,m]=(0,a.useState)(J[0]),[h,x]=(0,a.useState)(""),[g,p]=(0,a.useState)(""),[f,j]=(0,a.useState)(""),[y,v]=(0,a.useState)(null),k=(0,a.useRef)(null),w=(0,a.useCallback)(()=>{let e="claude"===o.id?"claude":o.id,n=1;for(;r.includes("".concat(e,"-").concat(n));)n++;return"".concat(e,"-").concat(n)},[o,r]);(0,a.useEffect)(()=>{n&&(m(J[0]),x(""),p(""),j(""),v(null),setTimeout(()=>{var e;return null===(e=k.current)||void 0===e?void 0:e.focus()},100))},[n]);let b=(0,a.useCallback)(e=>e.trim()?/^[a-zA-Z][a-zA-Z0-9-]*$/.test(e)?r.includes(e)?"An agent with this name already exists":null:"Name must start with a letter and contain only letters, numbers, and hyphens":"Name is required",[r]),N=async e=>{e.preventDefault();let n=h.trim()||w(),s=b(n);if(s){v(s);return}let a="custom"===o.id?g:o.command;if(!a.trim()){v("Command is required");return}v(null),await l({name:n,command:a.trim(),cwd:f.trim()||void 0})&&t()};if(!n)return null;let C=h?d(h):d(w()),S=c||y;return(0,s.jsx)("div",{className:"spawn-modal-overlay",onClick:t,children:(0,s.jsxs)("div",{className:"spawn-modal",onClick:e=>e.stopPropagation(),onKeyDown:e=>{"Escape"===e.key&&(e.preventDefault(),t())},children:[(0,s.jsxs)("div",{className:"spawn-modal-header",children:[(0,s.jsx)("h2",{children:"Spawn New Agent"}),(0,s.jsx)("button",{className:"spawn-modal-close",onClick:t,"aria-label":"Close",children:(0,s.jsx)(Q,{})})]}),(0,s.jsxs)("form",{onSubmit:N,children:[(0,s.jsxs)("div",{className:"spawn-modal-section",children:[(0,s.jsx)("label",{className:"spawn-modal-label",children:"Agent Type"}),(0,s.jsx)("div",{className:"spawn-modal-templates",children:J.map(e=>(0,s.jsxs)("button",{type:"button",className:"spawn-modal-template ".concat(o.id===e.id?"selected":""),onClick:()=>m(e),children:[(0,s.jsx)("span",{className:"spawn-modal-template-icon",children:e.icon}),(0,s.jsx)("span",{className:"spawn-modal-template-name",children:e.name}),(0,s.jsx)("span",{className:"spawn-modal-template-desc",children:e.description})]},e.id))})]}),(0,s.jsxs)("div",{className:"spawn-modal-section",children:[(0,s.jsx)("label",{className:"spawn-modal-label",htmlFor:"agent-name",children:"Agent Name"}),(0,s.jsxs)("div",{className:"spawn-modal-name-input",children:[(0,s.jsx)("div",{className:"spawn-modal-name-preview",style:{backgroundColor:C.primary,color:C.text},children:u(h||w())}),(0,s.jsx)("input",{ref:k,id:"agent-name",type:"text",className:"spawn-modal-input",placeholder:w(),value:h,onChange:e=>{x(e.target.value),v(null)},disabled:i})]}),(0,s.jsx)("div",{className:"spawn-modal-name-suggestions",children:G.slice(0,4).map(e=>(0,s.jsxs)("button",{type:"button",className:"spawn-modal-suggestion",onClick:()=>x("".concat(e,"-1")),children:[e,"-"]},e))})]}),"custom"===o.id&&(0,s.jsxs)("div",{className:"spawn-modal-section",children:[(0,s.jsx)("label",{className:"spawn-modal-label",htmlFor:"agent-command",children:"Command"}),(0,s.jsx)("input",{id:"agent-command",type:"text",className:"spawn-modal-input",placeholder:"e.g., python agent.py",value:g,onChange:e=>p(e.target.value),disabled:i})]}),(0,s.jsxs)("div",{className:"spawn-modal-section",children:[(0,s.jsxs)("label",{className:"spawn-modal-label",htmlFor:"agent-cwd",children:["Working Directory ",(0,s.jsx)("span",{className:"spawn-modal-optional",children:"(optional)"})]}),(0,s.jsx)("input",{id:"agent-cwd",type:"text",className:"spawn-modal-input",placeholder:"Current directory",value:f,onChange:e=>j(e.target.value),disabled:i})]}),S&&(0,s.jsxs)("div",{className:"spawn-modal-error",children:[(0,s.jsx)(Y,{}),(0,s.jsx)("span",{children:S})]}),(0,s.jsxs)("div",{className:"spawn-modal-actions",children:[(0,s.jsx)("button",{type:"button",className:"spawn-modal-btn spawn-modal-btn-secondary",onClick:t,disabled:i,children:"Cancel"}),(0,s.jsx)("button",{type:"submit",className:"spawn-modal-btn spawn-modal-btn-primary",disabled:i,children:i?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(X,{}),"Spawning..."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)($,{}),"Spawn Agent"]})})]})]})]})})}function Q(){return(0,s.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,s.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function Y(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,s.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),(0,s.jsx)("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}function $(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"}),(0,s.jsx)("path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"}),(0,s.jsx)("path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"}),(0,s.jsx)("path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"})]})}function X(){return(0,s.jsx)("svg",{className:"spawn-modal-spinner",width:"16",height:"16",viewBox:"0 0 24 24",children:(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",fill:"none",strokeDasharray:"32",strokeLinecap:"round"})})}let ee={theme:"system",notifications:{enabled:!0,sound:!0,desktop:!1,mentionsOnly:!1},display:{compactMode:!1,showTimestamps:!0,showAvatars:!0,animationsEnabled:!0},connection:{autoReconnect:!0,reconnectDelay:3e3,keepAliveInterval:3e4}};function en(e){let{isOpen:n,onClose:t,settings:l,onSettingsChange:r,onResetSettings:i}=e,[c,o]=(0,a.useState)("appearance"),d=(0,a.useCallback)((e,n,t)=>{let s=l[e];r({...l,[e]:{...s,[n]:t}})},[l,r]),u=(0,a.useCallback)(e=>{r({...l,theme:e})},[l,r]);return n?(0,s.jsx)("div",{className:"settings-overlay",onClick:t,children:(0,s.jsxs)("div",{className:"settings-panel",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"settings-header",children:[(0,s.jsx)("h2",{children:"Settings"}),(0,s.jsx)("button",{className:"settings-close",onClick:t,children:(0,s.jsx)(es,{})})]}),(0,s.jsxs)("div",{className:"settings-tabs",children:[(0,s.jsxs)("button",{className:"settings-tab ".concat("appearance"===c?"active":""),onClick:()=>o("appearance"),children:[(0,s.jsx)(ea,{}),"Appearance"]}),(0,s.jsxs)("button",{className:"settings-tab ".concat("notifications"===c?"active":""),onClick:()=>o("notifications"),children:[(0,s.jsx)(el,{}),"Notifications"]}),(0,s.jsxs)("button",{className:"settings-tab ".concat("connection"===c?"active":""),onClick:()=>o("connection"),children:[(0,s.jsx)(er,{}),"Connection"]})]}),(0,s.jsxs)("div",{className:"settings-content",children:["appearance"===c&&(0,s.jsxs)("div",{className:"settings-section",children:[(0,s.jsxs)("div",{className:"settings-group",children:[(0,s.jsx)("label",{className:"settings-label",children:"Theme"}),(0,s.jsx)("div",{className:"settings-theme-options",children:["light","dark","system"].map(e=>(0,s.jsxs)("button",{className:"settings-theme-btn ".concat(l.theme===e?"active":""),onClick:()=>u(e),children:["light"===e&&(0,s.jsx)(ei,{}),"dark"===e&&(0,s.jsx)(ec,{}),"system"===e&&(0,s.jsx)(eo,{}),(0,s.jsx)("span",{children:e.charAt(0).toUpperCase()+e.slice(1)})]},e))})]}),(0,s.jsxs)("div",{className:"settings-group",children:[(0,s.jsx)("label",{className:"settings-label",children:"Display Options"}),(0,s.jsx)(et,{label:"Compact mode",description:"Show more content in less space",checked:l.display.compactMode,onChange:e=>d("display","compactMode",e)}),(0,s.jsx)(et,{label:"Show timestamps",description:"Display time for each message",checked:l.display.showTimestamps,onChange:e=>d("display","showTimestamps",e)}),(0,s.jsx)(et,{label:"Show avatars",description:"Display agent avatars in messages",checked:l.display.showAvatars,onChange:e=>d("display","showAvatars",e)}),(0,s.jsx)(et,{label:"Enable animations",description:"Smooth transitions and effects",checked:l.display.animationsEnabled,onChange:e=>d("display","animationsEnabled",e)})]})]}),"notifications"===c&&(0,s.jsx)("div",{className:"settings-section",children:(0,s.jsxs)("div",{className:"settings-group",children:[(0,s.jsx)("label",{className:"settings-label",children:"Notification Preferences"}),(0,s.jsx)(et,{label:"Enable notifications",description:"Receive alerts for new messages",checked:l.notifications.enabled,onChange:e=>d("notifications","enabled",e)}),(0,s.jsx)(et,{label:"Sound alerts",description:"Play sound for new messages",checked:l.notifications.sound,onChange:e=>d("notifications","sound",e),disabled:!l.notifications.enabled}),(0,s.jsx)(et,{label:"Desktop notifications",description:"Show system notifications",checked:l.notifications.desktop,onChange:e=>d("notifications","desktop",e),disabled:!l.notifications.enabled}),(0,s.jsx)(et,{label:"Mentions only",description:"Only notify when mentioned",checked:l.notifications.mentionsOnly,onChange:e=>d("notifications","mentionsOnly",e),disabled:!l.notifications.enabled})]})}),"connection"===c&&(0,s.jsx)("div",{className:"settings-section",children:(0,s.jsxs)("div",{className:"settings-group",children:[(0,s.jsx)("label",{className:"settings-label",children:"Connection Settings"}),(0,s.jsx)(et,{label:"Auto-reconnect",description:"Automatically reconnect on disconnect",checked:l.connection.autoReconnect,onChange:e=>d("connection","autoReconnect",e)}),(0,s.jsxs)("div",{className:"settings-input-group",children:[(0,s.jsx)("label",{children:"Reconnect delay (ms)"}),(0,s.jsx)("input",{type:"number",className:"settings-input",value:l.connection.reconnectDelay,onChange:e=>d("connection","reconnectDelay",parseInt(e.target.value)||3e3),min:1e3,max:3e4,step:1e3,disabled:!l.connection.autoReconnect})]}),(0,s.jsxs)("div",{className:"settings-input-group",children:[(0,s.jsx)("label",{children:"Keep-alive interval (ms)"}),(0,s.jsx)("input",{type:"number",className:"settings-input",value:l.connection.keepAliveInterval,onChange:e=>d("connection","keepAliveInterval",parseInt(e.target.value)||3e4),min:5e3,max:12e4,step:5e3})]})]})})]}),(0,s.jsxs)("div",{className:"settings-footer",children:[i&&(0,s.jsx)("button",{className:"settings-reset-btn",onClick:i,children:"Reset to defaults"}),(0,s.jsx)("button",{className:"settings-done-btn",onClick:t,children:"Done"})]})]})}):null}function et(e){let{label:n,description:t,checked:a,onChange:l,disabled:r}=e;return(0,s.jsxs)("div",{className:"settings-toggle-option ".concat(r?"disabled":""),children:[(0,s.jsxs)("div",{className:"settings-toggle-info",children:[(0,s.jsx)("span",{className:"settings-toggle-label",children:n}),(0,s.jsx)("span",{className:"settings-toggle-desc",children:t})]}),(0,s.jsx)("button",{className:"settings-toggle ".concat(a?"on":""),onClick:()=>!r&&l(!a),disabled:r,role:"switch","aria-checked":a,children:(0,s.jsx)("span",{className:"settings-toggle-thumb"})})]})}function es(){return(0,s.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,s.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function ea(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("circle",{cx:"13.5",cy:"6.5",r:".5"}),(0,s.jsx)("circle",{cx:"17.5",cy:"10.5",r:".5"}),(0,s.jsx)("circle",{cx:"8.5",cy:"7.5",r:".5"}),(0,s.jsx)("circle",{cx:"6.5",cy:"12.5",r:".5"}),(0,s.jsx)("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.555C21.965 6.012 17.461 2 12 2z"})]})}function el(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),(0,s.jsx)("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})]})}function er(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("path",{d:"M5 12.55a11 11 0 0 1 14.08 0"}),(0,s.jsx)("path",{d:"M1.42 9a16 16 0 0 1 21.16 0"}),(0,s.jsx)("path",{d:"M8.53 16.11a6 6 0 0 1 6.95 0"}),(0,s.jsx)("line",{x1:"12",y1:"20",x2:"12.01",y2:"20"})]})}function ei(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"5"}),(0,s.jsx)("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),(0,s.jsx)("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),(0,s.jsx)("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),(0,s.jsx)("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),(0,s.jsx)("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),(0,s.jsx)("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),(0,s.jsx)("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),(0,s.jsx)("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})}function ec(){return(0,s.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,s.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})}function eo(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",ry:"2"}),(0,s.jsx)("line",{x1:"8",y1:"21",x2:"16",y2:"21"}),(0,s.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"21"})]})}function ed(e,n){let t=e.match(/^@(\S*)/);return t&&n<=t[0].length?t[1]:null}function eu(e,n){let t=e.match(/^@\S*/);return t?"@".concat(n," ")+e.substring(t[0].length):e}function em(e){let{agents:n,inputValue:t,cursorPosition:l,onSelect:r,onClose:i,isVisible:c}=e,[o,m]=(0,a.useState)(0),h=(0,a.useRef)(null),x=(0,a.useMemo)(()=>ed(t,l),[t,l]),g=(0,a.useMemo)(()=>{if(null===x)return[];let e=x.toLowerCase(),t=[];return("*".includes(e)||"everyone".includes(e)||"all".includes(e)||"broadcast".includes(e)||""===e)&&t.push({name:"*",displayName:"@everyone",description:"Broadcast to all agents",isBroadcast:!0}),n.filter(n=>n.name.toLowerCase().includes(e)).forEach(e=>{t.push({name:e.name,displayName:"@".concat(e.name),description:e.status||"Agent"})}),t},[x,n]);(0,a.useEffect)(()=>{m(0)},[g.length]),(0,a.useEffect)(()=>{if(!h.current)return;let e=h.current.querySelector(".mention-item.selected");e&&e.scrollIntoView({block:"nearest"})},[o]);let p=(0,a.useCallback)(e=>{if(c&&0!==g.length)switch(e.key){case"ArrowDown":e.preventDefault(),m(e=>(e+1)%g.length);break;case"ArrowUp":e.preventDefault(),m(e=>(e-1+g.length)%g.length);break;case"Enter":case"Tab":e.preventDefault();let n=g[o];if(n){let e=eu(t,n.name);r(n.name,e)}break;case"Escape":e.preventDefault(),i()}},[c,g,o,t,r,i]);(0,a.useEffect)(()=>{if(c)return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[c,p]);let f=(0,a.useCallback)(e=>{let n=eu(t,e.name);r(e.name,n)},[t,r]);return c&&0!==g.length?(0,s.jsx)("div",{className:"mention-autocomplete",ref:h,children:g.map((e,n)=>(0,s.jsxs)("div",{className:"mention-item ".concat(n===o?"selected":""),onClick:()=>f(e),onMouseEnter:()=>m(n),children:[(0,s.jsx)("div",{className:"mention-avatar",style:{background:e.isBroadcast?"var(--accent-warning, #f59e0b)":d(e.name).primary},children:e.isBroadcast?"*":u(e.name)}),(0,s.jsxs)("div",{className:"mention-info",children:[(0,s.jsx)("span",{className:"mention-name",children:e.displayName}),(0,s.jsx)("span",{className:"mention-description",children:e.description})]})]},e.name))}):null}let eh={url:"",autoConnect:!0,reconnect:!0,maxReconnectAttempts:10,reconnectDelay:1e3},ex={async sendMessage(e){try{let n=await fetch("".concat("","/api/send"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),t=await n.json();if(n.ok&&t.success)return{success:!0};return{success:!1,error:t.error||"Failed to send message"}}catch(e){return{success:!1,error:"Network error"}}},async spawnAgent(e){try{let n=await fetch("".concat("","/api/spawn"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await n.json()}catch(n){return{success:!1,name:e.name,error:"Network error"}}},async getSpawnedAgents(){try{let e=await fetch("".concat("","/api/spawned")),n=await e.json();if(e.ok&&n.success)return{success:!0,data:{agents:n.agents||[]}};return{success:!1,error:n.error}}catch(e){return{success:!1,error:"Network error"}}},async releaseAgent(e){try{let n=await fetch("".concat("","/api/spawned/").concat(encodeURIComponent(e)),{method:"DELETE"}),t=await n.json();if(n.ok&&t.success)return{success:!0};return{success:!1,error:t.error}}catch(e){return{success:!1,error:"Network error"}}},async getData(){try{let e=await fetch("".concat("","/api/data")),n=await e.json();if(e.ok)return{success:!0,data:n};return{success:!1,error:"Failed to fetch data"}}catch(e){return{success:!1,error:"Network error"}}},async getBridgeData(){try{let e=await fetch("".concat("","/api/bridge")),n=await e.json();if(e.ok)return{success:!0,data:n};return{success:!1,error:"Failed to fetch bridge data"}}catch(e){return{success:!1,error:"Network error"}}},async getMetrics(){try{let e=await fetch("".concat("","/api/metrics")),n=await e.json();if(e.ok)return{success:!0,data:n};return{success:!1,error:"Failed to fetch metrics"}}catch(e){return{success:!1,error:"Network error"}}}};function eg(e){var n,t,l,r;let{wsUrl:i}=e,{data:c,isConnected:o,error:u}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={...eh,...e},t=n.url||function(){let e="https:"===window.location.protocol?"wss:":"ws:";return"".concat(e,"//localhost:3888/ws")}(),[s,l]=(0,a.useState)(null),[r,i]=(0,a.useState)(!1),[c,o]=(0,a.useState)(null),d=(0,a.useRef)(null),u=(0,a.useRef)(0),m=(0,a.useRef)(null),h=(0,a.useCallback)(()=>{var e;if((null===(e=d.current)||void 0===e?void 0:e.readyState)!==WebSocket.OPEN)try{let e=new WebSocket(t);e.onopen=()=>{i(!0),o(null),u.current=0},e.onclose=()=>{if(i(!1),d.current=null,n.reconnect&&u.current<n.maxReconnectAttempts){let e=Math.min(n.reconnectDelay*Math.pow(2,u.current),3e4);u.current++,m.current=setTimeout(()=>{h()},e)}},e.onerror=e=>{o(Error("WebSocket connection error")),console.error("[useWebSocket] Error:",e)},e.onmessage=e=>{try{let n=JSON.parse(e.data);l(n)}catch(e){console.error("[useWebSocket] Failed to parse message:",e)}},d.current=e}catch(e){o(e instanceof Error?e:Error("Failed to create WebSocket"))}},[t,n.reconnect,n.maxReconnectAttempts,n.reconnectDelay]),x=(0,a.useCallback)(()=>{m.current&&(clearTimeout(m.current),m.current=null),d.current&&(d.current.close(),d.current=null),i(!1)},[]);return(0,a.useEffect)(()=>(n.autoConnect&&h(),()=>{x()}),[n.autoConnect,h,x]),{data:s,isConnected:r,error:c,connect:h,disconnect:x}}({url:i}),[h,g]=(0,a.useState)("local"),[f,j]=(0,a.useState)(!1),[y,v]=(0,a.useState)(!1),[k,w]=(0,a.useState)(null),[b,N]=(0,a.useState)(!1),[C,S]=(0,a.useState)(!1),[M,D]=(0,a.useState)(ee),{agents:E,groups:B,selectedAgent:W,selectAgent:R,searchQuery:T,setSearchQuery:O,totalCount:P,onlineCount:V,needsAttentionCount:z}=function(e){let{agents:n,initialSelected:t,initialSearchQuery:s=""}=e,[l,r]=(0,a.useState)(null!=t?t:null),[i,c]=(0,a.useState)(s),o=(0,a.useMemo)(()=>x(n,i),[n,i]),u=(0,a.useMemo)(()=>m(o),[o]),h=(0,a.useMemo)(()=>[...o].sort((e,n)=>e.name.localeCompare(n.name)),[o]),g=(0,a.useMemo)(()=>{var e;return null!==(e=n.find(e=>e.name===l))&&void 0!==e?e:null},[n,l]),f=(0,a.useMemo)(()=>{let e=p(n);return{totalCount:e.total,onlineCount:e.online,needsAttentionCount:e.needsAttention}},[n]),j=(0,a.useCallback)(e=>{r(e)},[]),y=(0,a.useCallback)(e=>n.find(n=>n.name===e),[n]),v=(0,a.useCallback)(e=>({...e,color:d(e.name)}),[]);return{agents:o,groups:u,sortedAgents:h,selectedAgent:g,selectAgent:j,searchQuery:i,setSearchQuery:c,...f,getAgentByName:y,getAgentWithColor:v}}({agents:null!==(l=null==c?void 0:c.agents)&&void 0!==l?l:[]}),{messages:H,currentChannel:K,setCurrentChannel:U,currentThread:_,setCurrentThread:q,sendMessage:J,isSending:G,sendError:Q}=function(e){let{messages:n,currentChannel:t="general"}=e,[s,l]=(0,a.useState)(t),[r,i]=(0,a.useState)(null),[c,o]=(0,a.useState)(!1),[d,u]=(0,a.useState)(null),m=(0,a.useMemo)(()=>"general"===s?n:n.filter(e=>e.from===s||e.to===s),[n,s]),h=(0,a.useCallback)(e=>n.filter(n=>n.thread===e),[n]),x=(0,a.useMemo)(()=>{let e=n.filter(e=>!e.isRead).length;return{totalCount:n.length,unreadCount:e}},[n]);return{messages:m,threadMessages:h,currentChannel:s,setCurrentChannel:l,currentThread:r,setCurrentThread:i,sendMessage:(0,a.useCallback)(async(e,n,t)=>{o(!0),u(null);try{let s=await fetch("/api/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({to:e,message:n,thread:t})}),a=await s.json();if(s.ok&&a.success)return!0;return u(a.error||"Failed to send message"),!1}catch(e){return u("Network error"),!1}finally{o(!1)}},[]),isSending:c,sendError:d,...x}}({messages:null!==(r=null==c?void 0:c.messages)&&void 0!==r?r:[]}),Y=!!(null==c?void 0:null===(t=c.fleet)||void 0===t?void 0:null===(n=t.servers)||void 0===n?void 0:n.length),$=(0,a.useCallback)(e=>{R(e.name),U(e.name)},[R,U]),X=(0,a.useCallback)(()=>{w(null),j(!0)},[]),et=(0,a.useCallback)(()=>{S(!0)},[]),es=(0,a.useCallback)(async e=>{v(!0),w(null);try{let n=await ex.spawnAgent({name:e.name,cli:e.command});if(!n.success)return w(n.error||"Failed to spawn agent"),!1;return!0}catch(e){return w(e instanceof Error?e.message:"Failed to spawn agent"),!1}finally{v(!1)}},[]),ea=(0,a.useCallback)(async e=>{if(e.isSpawned&&window.confirm('Are you sure you want to release agent "'.concat(e.name,'"?')))try{let n=await ex.releaseAgent(e.name);n.success||console.error("Failed to release agent:",n.error)}catch(e){console.error("Failed to release agent:",e)}},[]),el=(0,a.useCallback)(()=>{N(!0)},[]);return a.useEffect(()=>{let e=e=>{let n;n="system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e,document.documentElement.setAttribute("data-theme",n)};if(e(M.theme),"system"===M.theme){let n=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>e("system");return n.addEventListener("change",t),()=>n.removeEventListener("change",t)}},[M.theme]),a.useEffect(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key&&(e.preventDefault(),N(!0)),(e.metaKey||e.ctrlKey)&&e.shiftKey&&"s"===e.key&&(e.preventDefault(),X()),"Escape"===e.key&&(N(!1),j(!1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[X]),(0,s.jsxs)("div",{className:"dashboard-app",children:[(0,s.jsx)(A,{agents:E,selectedAgent:null==W?void 0:W.name,viewMode:h,isFleetAvailable:Y,isConnected:o,onAgentSelect:$,onViewModeChange:g,onSpawnClick:X,onReleaseClick:ea}),(0,s.jsxs)("main",{className:"dashboard-main",children:[(0,s.jsx)(L,{currentChannel:K,selectedAgent:W,onCommandPaletteOpen:el,onSettingsClick:et}),(0,s.jsx)("div",{className:"dashboard-content",children:u?(0,s.jsxs)("div",{className:"error-state",children:[(0,s.jsx)(ej,{}),(0,s.jsx)("h2",{children:"Connection Error"}),(0,s.jsx)("p",{children:u.message}),(0,s.jsx)("button",{onClick:()=>window.location.reload(),children:"Retry Connection"})]}):c?(0,s.jsx)("div",{className:"messages-container",children:(0,s.jsx)(F,{messages:H,currentChannel:K,onThreadClick:e=>q(e),highlightedMessageId:null!=_?_:void 0})}):(0,s.jsxs)("div",{className:"loading-state",children:[(0,s.jsx)(ef,{}),(0,s.jsx)("p",{children:"Connecting to dashboard..."})]})}),(0,s.jsx)("div",{className:"message-composer",children:(0,s.jsx)(ep,{recipient:"general"===K?"*":K,agents:E,onSend:J,isSending:G,error:Q})})]}),(0,s.jsx)(I,{isOpen:b,onClose:()=>N(!1),agents:E,onAgentSelect:$,onSpawnClick:X,onGeneralClick:()=>{R(null),U("general")}}),(0,s.jsx)(Z,{isOpen:f,onClose:()=>j(!1),onSpawn:es,existingAgents:E.map(e=>e.name),isSpawning:y,error:k}),(0,s.jsx)(en,{isOpen:C,onClose:()=>S(!1),settings:M,onSettingsChange:D,onResetSettings:()=>D(ee)})]})}function ep(e){let{recipient:n,agents:t,onSend:l,isSending:r,error:i}=e,[c,o]=(0,a.useState)(""),[d,u]=(0,a.useState)(0),[m,h]=(0,a.useState)(!1),x=(0,a.useRef)(null),g=async e=>{let t,s;if(e.preventDefault(),!c.trim()||r)return;let a=c.match(/^@(\S+)\s*([\s\S]*)/);if(a){let e=a[1];s=a[2]||"",t="*"===e||"everyone"===e.toLowerCase()||"all"===e.toLowerCase()?"*":e}else t=n,s=c;await l(t,s||c)&&(o(""),h(!1))};return(0,s.jsxs)("form",{className:"composer-form",onSubmit:g,children:[(0,s.jsxs)("div",{className:"composer-input-wrapper",children:[(0,s.jsx)(em,{agents:t,inputValue:c,cursorPosition:d,onSelect:(e,n)=>{o(n),h(!1),setTimeout(()=>{if(x.current){x.current.focus();let e=n.indexOf(" ")+1;x.current.setSelectionRange(e,e)}},0)},onClose:()=>h(!1),isVisible:m}),(0,s.jsx)("input",{ref:x,type:"text",className:"composer-input",placeholder:"Message ".concat("*"===n?"everyone":"@"+n,"... (type @ to mention)"),value:c,onChange:e=>{let n=e.target.value,t=e.target.selectionStart||0;o(n),u(t),h(null!==ed(n,t))},onSelect:e=>u(e.target.selectionStart||0),disabled:r})]}),(0,s.jsx)("button",{type:"submit",className:"composer-send",disabled:!c.trim()||r,children:r?"Sending...":"Send"}),i&&(0,s.jsx)("span",{className:"composer-error",children:i})]})}function ef(){return(0,s.jsx)("svg",{className:"spinner",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",fill:"none",strokeDasharray:"32",strokeLinecap:"round"})})}function ej(){return(0,s.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,s.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),(0,s.jsx)("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}function ey(){return(0,s.jsx)(eg,{})}}},function(e){e.O(0,[971,117,744],function(){return e(e.s=8440)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{8440:function(e,n,t){Promise.resolve().then(t.bind(t,546))},546:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return ey}});var s=t(7437),a=t(2265);let l={backend:{primary:"#1264a3",light:"#e8f4fd",dark:"#0d4f82",text:"#ffffff"},frontend:{primary:"#7c3aed",light:"#f3e8ff",dark:"#5b21b6",text:"#ffffff"},infra:{primary:"#ea580c",light:"#fff7ed",dark:"#c2410c",text:"#ffffff"},lead:{primary:"#2bac76",light:"#ecfdf5",dark:"#059669",text:"#ffffff"},test:{primary:"#0d9488",light:"#f0fdfa",dark:"#0f766e",text:"#ffffff"},data:{primary:"#dc2626",light:"#fef2f2",dark:"#b91c1c",text:"#ffffff"},api:{primary:"#2563eb",light:"#eff6ff",dark:"#1d4ed8",text:"#ffffff"},worker:{primary:"#9333ea",light:"#faf5ff",dark:"#7e22ce",text:"#ffffff"},monitor:{primary:"#0891b2",light:"#ecfeff",dark:"#0e7490",text:"#ffffff"},security:{primary:"#be123c",light:"#fff1f2",dark:"#9f1239",text:"#ffffff"}},r=[{primary:"#6366f1",light:"#eef2ff",dark:"#4f46e5",text:"#ffffff"},{primary:"#ec4899",light:"#fdf2f8",dark:"#db2777",text:"#ffffff"},{primary:"#14b8a6",light:"#f0fdfa",dark:"#0d9488",text:"#ffffff"},{primary:"#f59e0b",light:"#fffbeb",dark:"#d97706",text:"#000000"},{primary:"#8b5cf6",light:"#f5f3ff",dark:"#7c3aed",text:"#ffffff"},{primary:"#06b6d4",light:"#ecfeff",dark:"#0891b2",text:"#ffffff"},{primary:"#f43f5e",light:"#fff1f2",dark:"#e11d48",text:"#ffffff"},{primary:"#84cc16",light:"#f7fee7",dark:"#65a30d",text:"#000000"}],i={online:"#22c55e",offline:"#6b7280",busy:"#eab308",processing:"#6366f1",error:"#ef4444",attention:"#ef4444"};function c(e){return e.toLowerCase().split("-").filter(Boolean)}function o(e){return c(e)[0]||e.toLowerCase()}function d(e){let n=o(e);return n in l?l[n]:r[function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n&=n;return Math.abs(n)}(n)%r.length]}function u(e){let n=c(e);return 0===n.length?e.substring(0,2).toUpperCase():n.length>=2?(n[0][0]+n[1][0]).toUpperCase():n[0].substring(0,2).toUpperCase()}function m(e){let n=new Map;for(let t of e){let e=o(t.name),s=d(t.name),a=n.get(e);a||(a={prefix:e,displayName:g(e),color:s,agents:[],isExpanded:!0},n.set(e,a)),a.agents.push(t)}let t=Array.from(n.values()).sort((e,n)=>e.prefix.localeCompare(n.prefix));for(let e of t)e.agents.sort((e,n)=>e.name.localeCompare(n.name));return t}function h(e){return e.split("-").filter(Boolean).map(g).join(" > ")}function x(e,n){return n?e.filter(e=>(function(e,n){if(!n)return!0;let t=n.toLowerCase(),s=e.toLowerCase();return!!s.includes(t)||s.split("-").some(e=>e.includes(t))})(e.name,n)):e}function g(e){return e?e.charAt(0).toUpperCase()+e.slice(1):e}function p(e){let n=0,t=0,s=0;for(let a of e)"online"===a.status?n++:"offline"===a.status&&t++,a.needsAttention&&s++;return{total:e.length,online:n,offline:t,needsAttention:s}}function f(e){let{isProcessing:n,processingStartedAt:t,size:l="medium",showElapsed:r=!1}=e,[i,c]=(0,a.useState)(0);return((0,a.useEffect)(()=>{if(!n||!t){c(0);return}let e=()=>{c(Date.now()-t)};e();let s=setInterval(e,1e3);return()=>clearInterval(s)},[n,t]),n)?(0,s.jsxs)("div",{className:"thinking-indicator ".concat({small:"thinking-indicator-small",medium:"thinking-indicator-medium",large:"thinking-indicator-large"}[l]),children:[(0,s.jsxs)("div",{className:"thinking-dots",children:[(0,s.jsx)("span",{className:"thinking-dot"}),(0,s.jsx)("span",{className:"thinking-dot"}),(0,s.jsx)("span",{className:"thinking-dot"})]}),r&&i>0&&(0,s.jsx)("span",{className:"thinking-elapsed",children:(e=>{let n=Math.floor(e/1e3);return n<60?"".concat(n,"s"):"".concat(Math.floor(n/60),"m ").concat(n%60,"s")})(i)})]}):null}function j(e){let{isProcessing:n}=e;return n?(0,s.jsx)("span",{className:"thinking-dot-inline",title:"Processing...",children:(0,s.jsx)("span",{className:"thinking-dot-pulse"})}):null}function y(e){let{agent:n,isSelected:t=!1,showBreadcrumb:a=!1,compact:l=!1,onClick:r,onMessageClick:c,onReleaseClick:o}=e,m=d(n.name),x=u(n.name),p=function(e){let n=e.split("-").filter(Boolean);return 0===n.length?e:g(n[n.length-1])}(n.name),y=i[n.status]||i.offline,w=()=>{null==r||r(n)},b=e=>{e.stopPropagation(),null==o||o(n)};return l?(0,s.jsxs)("div",{className:"agent-card-compact ".concat(t?"selected":""),onClick:w,style:{"--agent-primary":m.primary,"--agent-light":m.light},children:[(0,s.jsx)("div",{className:"agent-avatar-small",style:{backgroundColor:m.primary},children:(0,s.jsx)("span",{style:{color:m.text},children:x})}),(0,s.jsxs)("div",{className:"agent-compact-info",children:[(0,s.jsx)("span",{className:"agent-name",children:p}),(0,s.jsx)("span",{className:"agent-breadcrumb-compact",children:h(n.name)})]}),(0,s.jsxs)("div",{className:"agent-compact-actions",children:[n.isSpawned&&o&&(0,s.jsx)("button",{className:"release-btn-compact",onClick:b,title:"Kill agent",children:(0,s.jsx)(k,{})}),n.isProcessing?(0,s.jsx)(j,{isProcessing:!0}):(0,s.jsx)("div",{className:"agent-status-dot",style:{backgroundColor:y}}),n.needsAttention&&(0,s.jsx)("div",{className:"attention-badge"})]})]}):(0,s.jsxs)("div",{className:"agent-card ".concat(t?"selected":""),onClick:w,style:{"--agent-primary":m.primary,"--agent-light":m.light,"--agent-dark":m.dark},children:[(0,s.jsxs)("div",{className:"agent-card-header",children:[(0,s.jsxs)("div",{className:"agent-avatar",style:{backgroundColor:m.primary},children:[(0,s.jsx)("span",{style:{color:m.text},children:x}),(0,s.jsx)("div",{className:"status-indicator",style:{backgroundColor:y}})]}),(0,s.jsxs)("div",{className:"agent-info",children:[(0,s.jsxs)("div",{className:"agent-name-row",children:[(0,s.jsx)("span",{className:"agent-display-name",children:p}),n.needsAttention&&(0,s.jsx)("span",{className:"attention-badge",title:"Needs attention",children:"!"})]}),a?(0,s.jsx)("span",{className:"agent-breadcrumb",children:h(n.name)}):(0,s.jsx)("span",{className:"agent-full-name",children:n.name})]})]}),n.isProcessing&&(0,s.jsxs)("div",{className:"agent-thinking",children:[(0,s.jsx)(f,{isProcessing:!0,processingStartedAt:n.processingStartedAt,size:"medium",showElapsed:!0}),(0,s.jsx)("span",{className:"thinking-label",children:"Thinking..."})]}),n.currentTask&&!n.isProcessing&&(0,s.jsxs)("div",{className:"agent-task",children:[(0,s.jsx)("span",{className:"task-label",children:"Working on:"}),(0,s.jsx)("span",{className:"task-text",children:n.currentTask})]}),(0,s.jsxs)("div",{className:"agent-card-footer",children:[(0,s.jsxs)("div",{className:"agent-meta",children:[n.cli&&(0,s.jsx)("span",{className:"agent-cli",children:n.cli}),void 0!==n.messageCount&&n.messageCount>0&&(0,s.jsxs)("span",{className:"message-count",children:[n.messageCount," msgs"]}),n.isSpawned&&(0,s.jsx)("span",{className:"agent-spawned-badge",children:"spawned"})]}),(0,s.jsxs)("div",{className:"agent-actions",children:[n.isSpawned&&o&&(0,s.jsx)("button",{className:"release-btn",onClick:b,title:"Release agent",children:(0,s.jsx)(k,{})}),c&&(0,s.jsx)("button",{className:"message-btn",onClick:e=>{e.stopPropagation(),null==c||c(n)},title:"Send message",children:(0,s.jsx)(v,{})})]})]})]})}function v(){return(0,s.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,s.jsx)("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function k(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,s.jsx)("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),(0,s.jsx)("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]})}function w(e){let{agents:n,selectedAgent:t,searchQuery:l="",onAgentSelect:r,onAgentMessage:i,onReleaseClick:c,compact:o=!1,showGroupStats:d=!0}=e,[u,h]=(0,a.useState)(new Set),[g,p]=(0,a.useState)(!0),f=(0,a.useMemo)(()=>x(n,l),[n,l]),j=(0,a.useMemo)(()=>m(f),[f]);(0,a.useMemo)(()=>{0===u.size&&j.length>0&&h(new Set(j.map(e=>e.prefix)))},[j]);let y=e=>{h(n=>{let t=new Set(n);return t.has(e)?t.delete(e):t.add(e),t})};return 0===n.length?(0,s.jsxs)("div",{className:"agent-list-empty",children:[(0,s.jsx)(C,{}),(0,s.jsx)("p",{children:"No agents connected"})]}):0===f.length?(0,s.jsxs)("div",{className:"agent-list-empty",children:[(0,s.jsx)(S,{}),(0,s.jsxs)("p",{children:['No agents match "',l,'"']})]}):(0,s.jsxs)("div",{className:"agent-list",children:[j.length>1&&(0,s.jsxs)("div",{className:"agent-list-header",children:[(0,s.jsxs)("span",{className:"agent-count",children:[f.length," agents"]}),(0,s.jsx)("button",{className:"toggle-all-btn",onClick:()=>{g?h(new Set):h(new Set(j.map(e=>e.prefix))),p(!g)},children:g?"Collapse all":"Expand all"})]}),j.map(e=>(0,s.jsx)(b,{group:e,isExpanded:u.has(e.prefix),selectedAgent:t,compact:o,showStats:d,onToggle:()=>y(e.prefix),onAgentSelect:r,onAgentMessage:i,onReleaseClick:c},e.prefix))]})}function b(e){let{group:n,isExpanded:t,selectedAgent:a,compact:l,showStats:r,onToggle:c,onAgentSelect:o,onAgentMessage:d,onReleaseClick:u}=e,m=r?p(n.agents):null;return(0,s.jsxs)("div",{className:"agent-group",children:[(0,s.jsxs)("button",{className:"agent-group-header",onClick:c,style:{"--group-color":n.color.primary,"--group-light":n.color.light},children:[(0,s.jsx)("div",{className:"group-color-bar"}),(0,s.jsx)(N,{expanded:t}),(0,s.jsx)("span",{className:"group-name",children:n.displayName}),(0,s.jsxs)("span",{className:"group-count",children:["(",n.agents.length,")"]}),r&&m&&(0,s.jsxs)("div",{className:"group-stats",children:[m.online>0&&(0,s.jsxs)("span",{className:"stat online",children:[(0,s.jsx)("span",{className:"stat-dot",style:{backgroundColor:i.online}}),m.online]}),m.needsAttention>0&&(0,s.jsxs)("span",{className:"stat attention",children:[(0,s.jsx)("span",{className:"stat-dot",style:{backgroundColor:i.attention}}),m.needsAttention]})]})]}),t&&(0,s.jsx)("div",{className:"agent-group-content",children:n.agents.map(e=>(0,s.jsx)(y,{agent:e,isSelected:e.name===a,compact:l,onClick:o,onMessageClick:d,onReleaseClick:u},e.name))})]})}function N(e){let{expanded:n}=e;return(0,s.jsx)("svg",{className:"chevron-icon ".concat(n?"expanded":""),width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,s.jsx)("polyline",{points:"9 18 15 12 9 6"})})}function C(){return(0,s.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",children:[(0,s.jsx)("circle",{cx:"12",cy:"8",r:"5"}),(0,s.jsx)("path",{d:"M20 21a8 8 0 1 0-16 0"})]})}function S(){return(0,s.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",children:[(0,s.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,s.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}function A(e){let{agents:n,selectedAgent:t,viewMode:l,isFleetAvailable:r,isConnected:i,onAgentSelect:c,onViewModeChange:o,onSpawnClick:d,onReleaseClick:u}=e,[m,h]=(0,a.useState)("");return(0,s.jsxs)("aside",{className:"sidebar",children:[(0,s.jsxs)("div",{className:"sidebar-header",children:[(0,s.jsxs)("div",{className:"sidebar-title",children:[(0,s.jsx)("h1",{children:"Agent Relay"}),(0,s.jsx)(M,{isConnected:i})]}),r&&(0,s.jsxs)("div",{className:"view-mode-toggle",children:[(0,s.jsx)("button",{className:"toggle-btn ".concat("local"===l?"active":""),onClick:()=>null==o?void 0:o("local"),children:"Local"}),(0,s.jsx)("button",{className:"toggle-btn ".concat("fleet"===l?"active":""),onClick:()=>null==o?void 0:o("fleet"),children:"Fleet"})]})]}),(0,s.jsxs)("div",{className:"sidebar-search",children:[(0,s.jsx)(D,{}),(0,s.jsx)("input",{type:"text",placeholder:"Search agents...",value:m,onChange:e=>h(e.target.value)}),m&&(0,s.jsx)("button",{className:"clear-btn",onClick:()=>h(""),children:(0,s.jsx)(E,{})})]}),(0,s.jsx)("div",{className:"sidebar-content",children:(0,s.jsx)(w,{agents:n,selectedAgent:t,searchQuery:m,onAgentSelect:c,onReleaseClick:u,compact:!0,showGroupStats:!0})}),(0,s.jsxs)("div",{className:"sidebar-footer",children:[(0,s.jsxs)("a",{href:"/metrics",className:"nav-link metrics-link",children:[(0,s.jsx)(W,{}),(0,s.jsx)("span",{children:"Metrics"})]}),(0,s.jsxs)("button",{className:"spawn-btn",onClick:d,children:[(0,s.jsx)(B,{}),"Spawn Agent"]})]})]})}function M(e){let{isConnected:n}=e;return(0,s.jsx)("div",{className:"connection-indicator ".concat(n?"connected":"disconnected"),title:n?"Connected":"Disconnected"})}function D(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,s.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}function E(){return(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,s.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function B(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,s.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function W(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("path",{d:"M3 3v18h18"}),(0,s.jsx)("path",{d:"M18 17V9"}),(0,s.jsx)("path",{d:"M13 17V5"}),(0,s.jsx)("path",{d:"M8 17v-3"})]})}function L(e){let{currentChannel:n,selectedAgent:t,onCommandPaletteOpen:a,onSettingsClick:l}=e,r="general"===n,i=t?d(t.name):null;return(0,s.jsxs)("header",{className:"header",children:[(0,s.jsx)("div",{className:"header-left",children:r?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"channel-prefix",children:"#"}),(0,s.jsx)("span",{className:"channel-name",children:"general"}),(0,s.jsx)("span",{className:"channel-topic",children:"All agent communications"})]}):t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"agent-avatar-small",style:{backgroundColor:null==i?void 0:i.primary},children:(0,s.jsx)("span",{style:{color:null==i?void 0:i.text},children:u(t.name)})}),(0,s.jsxs)("div",{className:"channel-info",children:[(0,s.jsx)("span",{className:"channel-name",children:t.name}),(0,s.jsx)("span",{className:"channel-breadcrumb",children:h(t.name)})]}),t.status&&(0,s.jsx)("span",{className:"agent-status-badge",children:t.status})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"channel-prefix",children:"@"}),(0,s.jsx)("span",{className:"channel-name",children:n})]})}),(0,s.jsxs)("div",{className:"header-right",children:[(0,s.jsxs)("button",{className:"header-btn command-palette-btn",onClick:a,title:"Command Palette (⌘K)",children:[(0,s.jsx)(R,{}),(0,s.jsx)("span",{children:"Search"}),(0,s.jsx)("kbd",{children:"⌘K"})]}),(0,s.jsx)("button",{className:"header-btn icon-btn",onClick:l,title:"Settings",children:(0,s.jsx)(T,{})})]})]})}function R(){return(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,s.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}function T(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,s.jsx)("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"})]})}function F(e){let{messages:n,currentChannel:t,onThreadClick:l,highlightedMessageId:r}=e,i=(0,a.useRef)(null),c=(0,a.useRef)(null);(0,a.useEffect)(()=>{var e;null===(e=c.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})},[n.length]);let o=n.filter(e=>"general"===t?"*"===e.to||e.isBroadcast:e.from===t||e.to===t);return 0===o.length?(0,s.jsxs)("div",{className:"message-list-empty",children:[(0,s.jsx)(P,{}),(0,s.jsx)("h3",{children:"No messages yet"}),(0,s.jsx)("p",{children:"general"===t?"Broadcast messages will appear here":"Messages with ".concat(t," will appear here")})]}):(0,s.jsxs)("div",{className:"message-list",ref:i,children:[o.map(e=>(0,s.jsx)(O,{message:e,isHighlighted:e.id===r,onThreadClick:l},e.id)),(0,s.jsx)("div",{ref:c})]})}function O(e){let{message:n,isHighlighted:t,onThreadClick:l}=e,r=d(n.from),i=function(e){let n=new Date(e),t=new Date;if(n.toDateString()===t.toDateString())return n.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});let s=new Date(t);return(s.setDate(s.getDate()-1),n.toDateString()===s.toDateString())?"Yesterday ".concat(n.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):n.toLocaleDateString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}(n.timestamp);return(0,s.jsxs)("div",{className:"message-item ".concat(t?"highlighted":""),children:[(0,s.jsx)("div",{className:"message-avatar",style:{backgroundColor:r.primary},children:(0,s.jsx)("span",{style:{color:r.text},children:u(n.from)})}),(0,s.jsxs)("div",{className:"message-content",children:[(0,s.jsxs)("div",{className:"message-header",children:[(0,s.jsx)("span",{className:"message-sender",children:n.from}),"*"!==n.to&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"message-arrow",children:"→"}),(0,s.jsx)("span",{className:"message-recipient",children:n.to})]}),(0,s.jsx)("span",{className:"message-time",children:i}),"*"===n.to&&(0,s.jsx)("span",{className:"message-badge broadcast",children:"broadcast"})]}),(0,s.jsx)("div",{className:"message-body",children:n.content.replace(/\\n/g,"\n").replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n").map((e,n)=>(0,s.jsxs)(a.Fragment,{children:[n>0&&(0,s.jsx)("br",{}),function(e){let n=/(https?:\/\/[^\s]+)/g;return e.split(n).map((e,t)=>n.test(e)?(0,s.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"message-link",children:e},t):e)}(e)]},n))}),n.replyCount&&n.replyCount>0&&(0,s.jsxs)("button",{className:"message-thread-btn",onClick:()=>null==l?void 0:l(n.id),children:[(0,s.jsx)(V,{}),(0,s.jsxs)("span",{children:[n.replyCount," ",1===n.replyCount?"reply":"replies"]})]})]})]})}function P(){return(0,s.jsx)("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,s.jsx)("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function V(){return(0,s.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,s.jsx)("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function I(e){let{isOpen:n,onClose:t,agents:l,onAgentSelect:r,onSpawnClick:i,onSettingsClick:c,onGeneralClick:o,customCommands:d=[]}=e,[u,m]=(0,a.useState)(""),[h,x]=(0,a.useState)(0),g=(0,a.useRef)(null),p=(0,a.useRef)(null),f=(0,a.useMemo)(()=>[...l.map(e=>({id:"agent-".concat(e.name),label:e.name,description:e.currentTask||e.status,category:"agents",icon:(0,s.jsx)(z,{name:e.name}),action:()=>{r(e),t()}})),{id:"spawn-agent",label:"Spawn Agent",description:"Launch a new agent instance",category:"actions",icon:(0,s.jsx)(K,{}),shortcut:"⌘⇧S",action:()=>{i(),t()}},{id:"broadcast",label:"Broadcast Message",description:"Send message to all agents",category:"actions",icon:(0,s.jsx)(U,{}),action:()=>{t()}},{id:"nav-general",label:"Go to #general",description:"View all broadcast messages",category:"navigation",icon:(0,s.jsx)(_,{}),action:()=>{null==o||o(),t()}},...c?[{id:"settings",label:"Settings",description:"Configure dashboard preferences",category:"settings",icon:(0,s.jsx)(q,{}),shortcut:"⌘,",action:()=>{c(),t()}}]:[],...d],[l,r,i,c,o,t,d]),j=(0,a.useMemo)(()=>{if(!u.trim())return f;let e=u.toLowerCase();return f.filter(n=>{var t;return n.label.toLowerCase().includes(e)||(null===(t=n.description)||void 0===t?void 0:t.toLowerCase().includes(e))||n.category.toLowerCase().includes(e)})},[f,u]),y=(0,a.useMemo)(()=>{let e={};for(let n of j)e[n.category]||(e[n.category]=[]),e[n.category].push(n);return e},[j]),v=(0,a.useMemo)(()=>["agents","actions","navigation","settings"].flatMap(e=>y[e]||[]),[y]);(0,a.useEffect)(()=>{x(0)},[u]),(0,a.useEffect)(()=>{n&&(m(""),x(0),setTimeout(()=>{var e;return null===(e=g.current)||void 0===e?void 0:e.focus()},0))},[n]),(0,a.useEffect)(()=>{if(p.current&&v.length>0){let e=p.current.querySelector('[data-index="'.concat(h,'"]'));null==e||e.scrollIntoView({block:"nearest"})}},[h,v.length]);let k=(0,a.useCallback)(e=>{switch(e.key){case"ArrowDown":e.preventDefault(),x(e=>Math.min(e+1,v.length-1));break;case"ArrowUp":e.preventDefault(),x(e=>Math.max(e-1,0));break;case"Enter":e.preventDefault(),v[h]&&v[h].action();break;case"Escape":e.preventDefault(),t()}},[v,h,t]);if(!n)return null;let w={agents:"Agents",actions:"Actions",navigation:"Navigation",settings:"Settings"},b=0;return(0,s.jsx)("div",{className:"command-palette-overlay",onClick:t,children:(0,s.jsxs)("div",{className:"command-palette",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"command-palette-input-wrapper",children:[(0,s.jsx)(H,{}),(0,s.jsx)("input",{ref:g,type:"text",className:"command-palette-input",placeholder:"Search commands, agents...",value:u,onChange:e=>m(e.target.value),onKeyDown:k}),(0,s.jsx)("kbd",{className:"command-palette-kbd",children:"ESC"})]}),(0,s.jsx)("div",{className:"command-palette-list",ref:p,children:0===v.length?(0,s.jsxs)("div",{className:"command-palette-empty",children:['No results for "',u,'"']}):Object.entries(y).map(e=>{let[n,t]=e;return t.length?(0,s.jsxs)("div",{className:"command-palette-group",children:[(0,s.jsx)("div",{className:"command-palette-group-label",children:w[n]||n}),t.map(e=>{let n=b++;return(0,s.jsxs)("button",{"data-index":n,className:"command-palette-item ".concat(n===h?"selected":""),onClick:e.action,onMouseEnter:()=>x(n),children:[(0,s.jsx)("span",{className:"command-palette-item-icon",children:e.icon}),(0,s.jsxs)("span",{className:"command-palette-item-content",children:[(0,s.jsx)("span",{className:"command-palette-item-label",children:e.label}),e.description&&(0,s.jsx)("span",{className:"command-palette-item-desc",children:e.description})]}),e.shortcut&&(0,s.jsx)("kbd",{className:"command-palette-item-shortcut",children:e.shortcut})]},e.id)})]},n):null})})]})})}function z(e){let{name:n}=e,t=d(n);return(0,s.jsx)("div",{className:"command-palette-agent-icon",style:{backgroundColor:t.primary,color:t.text},children:u(n)})}function H(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,s.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}function K(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,s.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function U(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"2"}),(0,s.jsx)("path",{d:"M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49m11.31-2.82a10 10 0 0 1 0 14.14m-14.14 0a10 10 0 0 1 0-14.14"})]})}function _(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("line",{x1:"4",y1:"9",x2:"20",y2:"9"}),(0,s.jsx)("line",{x1:"4",y1:"15",x2:"20",y2:"15"}),(0,s.jsx)("line",{x1:"10",y1:"3",x2:"8",y2:"21"}),(0,s.jsx)("line",{x1:"16",y1:"3",x2:"14",y2:"21"})]})}function q(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,s.jsx)("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"})]})}let J=[{id:"claude",name:"Claude",command:"claude",description:"Claude Code CLI agent",icon:"\uD83E\uDD16"},{id:"codex",name:"Codex",command:"codex",description:"OpenAI Codex agent",icon:"⚡"},{id:"custom",name:"Custom",command:"",description:"Custom command",icon:"\uD83D\uDD27"}],G=["frontend","backend","lead","test","docs","review","deploy","data"];function Z(e){let{isOpen:n,onClose:t,onSpawn:l,existingAgents:r,isSpawning:i=!1,error:c}=e,[o,m]=(0,a.useState)(J[0]),[h,x]=(0,a.useState)(""),[g,p]=(0,a.useState)(""),[f,j]=(0,a.useState)(""),[y,v]=(0,a.useState)(null),k=(0,a.useRef)(null),w=(0,a.useCallback)(()=>{let e="claude"===o.id?"claude":o.id,n=1;for(;r.includes("".concat(e,"-").concat(n));)n++;return"".concat(e,"-").concat(n)},[o,r]);(0,a.useEffect)(()=>{n&&(m(J[0]),x(""),p(""),j(""),v(null),setTimeout(()=>{var e;return null===(e=k.current)||void 0===e?void 0:e.focus()},100))},[n]);let b=(0,a.useCallback)(e=>e.trim()?/^[a-zA-Z][a-zA-Z0-9-]*$/.test(e)?r.includes(e)?"An agent with this name already exists":null:"Name must start with a letter and contain only letters, numbers, and hyphens":"Name is required",[r]),N=async e=>{e.preventDefault();let n=h.trim()||w(),s=b(n);if(s){v(s);return}let a="custom"===o.id?g:o.command;if(!a.trim()){v("Command is required");return}v(null),await l({name:n,command:a.trim(),cwd:f.trim()||void 0})&&t()};if(!n)return null;let C=h?d(h):d(w()),S=c||y;return(0,s.jsx)("div",{className:"spawn-modal-overlay",onClick:t,children:(0,s.jsxs)("div",{className:"spawn-modal",onClick:e=>e.stopPropagation(),onKeyDown:e=>{"Escape"===e.key&&(e.preventDefault(),t())},children:[(0,s.jsxs)("div",{className:"spawn-modal-header",children:[(0,s.jsx)("h2",{children:"Spawn New Agent"}),(0,s.jsx)("button",{className:"spawn-modal-close",onClick:t,"aria-label":"Close",children:(0,s.jsx)(Q,{})})]}),(0,s.jsxs)("form",{onSubmit:N,children:[(0,s.jsxs)("div",{className:"spawn-modal-section",children:[(0,s.jsx)("label",{className:"spawn-modal-label",children:"Agent Type"}),(0,s.jsx)("div",{className:"spawn-modal-templates",children:J.map(e=>(0,s.jsxs)("button",{type:"button",className:"spawn-modal-template ".concat(o.id===e.id?"selected":""),onClick:()=>m(e),children:[(0,s.jsx)("span",{className:"spawn-modal-template-icon",children:e.icon}),(0,s.jsx)("span",{className:"spawn-modal-template-name",children:e.name}),(0,s.jsx)("span",{className:"spawn-modal-template-desc",children:e.description})]},e.id))})]}),(0,s.jsxs)("div",{className:"spawn-modal-section",children:[(0,s.jsx)("label",{className:"spawn-modal-label",htmlFor:"agent-name",children:"Agent Name"}),(0,s.jsxs)("div",{className:"spawn-modal-name-input",children:[(0,s.jsx)("div",{className:"spawn-modal-name-preview",style:{backgroundColor:C.primary,color:C.text},children:u(h||w())}),(0,s.jsx)("input",{ref:k,id:"agent-name",type:"text",className:"spawn-modal-input",placeholder:w(),value:h,onChange:e=>{x(e.target.value),v(null)},disabled:i})]}),(0,s.jsx)("div",{className:"spawn-modal-name-suggestions",children:G.slice(0,4).map(e=>(0,s.jsxs)("button",{type:"button",className:"spawn-modal-suggestion",onClick:()=>x("".concat(e,"-1")),children:[e,"-"]},e))})]}),"custom"===o.id&&(0,s.jsxs)("div",{className:"spawn-modal-section",children:[(0,s.jsx)("label",{className:"spawn-modal-label",htmlFor:"agent-command",children:"Command"}),(0,s.jsx)("input",{id:"agent-command",type:"text",className:"spawn-modal-input",placeholder:"e.g., python agent.py",value:g,onChange:e=>p(e.target.value),disabled:i})]}),(0,s.jsxs)("div",{className:"spawn-modal-section",children:[(0,s.jsxs)("label",{className:"spawn-modal-label",htmlFor:"agent-cwd",children:["Working Directory ",(0,s.jsx)("span",{className:"spawn-modal-optional",children:"(optional)"})]}),(0,s.jsx)("input",{id:"agent-cwd",type:"text",className:"spawn-modal-input",placeholder:"Current directory",value:f,onChange:e=>j(e.target.value),disabled:i})]}),S&&(0,s.jsxs)("div",{className:"spawn-modal-error",children:[(0,s.jsx)(Y,{}),(0,s.jsx)("span",{children:S})]}),(0,s.jsxs)("div",{className:"spawn-modal-actions",children:[(0,s.jsx)("button",{type:"button",className:"spawn-modal-btn spawn-modal-btn-secondary",onClick:t,disabled:i,children:"Cancel"}),(0,s.jsx)("button",{type:"submit",className:"spawn-modal-btn spawn-modal-btn-primary",disabled:i,children:i?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(X,{}),"Spawning..."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)($,{}),"Spawn Agent"]})})]})]})]})})}function Q(){return(0,s.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,s.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function Y(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,s.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),(0,s.jsx)("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}function $(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"}),(0,s.jsx)("path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"}),(0,s.jsx)("path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"}),(0,s.jsx)("path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"})]})}function X(){return(0,s.jsx)("svg",{className:"spawn-modal-spinner",width:"16",height:"16",viewBox:"0 0 24 24",children:(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",fill:"none",strokeDasharray:"32",strokeLinecap:"round"})})}let ee={theme:"system",notifications:{enabled:!0,sound:!0,desktop:!1,mentionsOnly:!1},display:{compactMode:!1,showTimestamps:!0,showAvatars:!0,animationsEnabled:!0},connection:{autoReconnect:!0,reconnectDelay:3e3,keepAliveInterval:3e4}};function en(e){let{isOpen:n,onClose:t,settings:l,onSettingsChange:r,onResetSettings:i}=e,[c,o]=(0,a.useState)("appearance"),d=(0,a.useCallback)((e,n,t)=>{let s=l[e];r({...l,[e]:{...s,[n]:t}})},[l,r]),u=(0,a.useCallback)(e=>{r({...l,theme:e})},[l,r]);return n?(0,s.jsx)("div",{className:"settings-overlay",onClick:t,children:(0,s.jsxs)("div",{className:"settings-panel",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"settings-header",children:[(0,s.jsx)("h2",{children:"Settings"}),(0,s.jsx)("button",{className:"settings-close",onClick:t,children:(0,s.jsx)(es,{})})]}),(0,s.jsxs)("div",{className:"settings-tabs",children:[(0,s.jsxs)("button",{className:"settings-tab ".concat("appearance"===c?"active":""),onClick:()=>o("appearance"),children:[(0,s.jsx)(ea,{}),"Appearance"]}),(0,s.jsxs)("button",{className:"settings-tab ".concat("notifications"===c?"active":""),onClick:()=>o("notifications"),children:[(0,s.jsx)(el,{}),"Notifications"]}),(0,s.jsxs)("button",{className:"settings-tab ".concat("connection"===c?"active":""),onClick:()=>o("connection"),children:[(0,s.jsx)(er,{}),"Connection"]})]}),(0,s.jsxs)("div",{className:"settings-content",children:["appearance"===c&&(0,s.jsxs)("div",{className:"settings-section",children:[(0,s.jsxs)("div",{className:"settings-group",children:[(0,s.jsx)("label",{className:"settings-label",children:"Theme"}),(0,s.jsx)("div",{className:"settings-theme-options",children:["light","dark","system"].map(e=>(0,s.jsxs)("button",{className:"settings-theme-btn ".concat(l.theme===e?"active":""),onClick:()=>u(e),children:["light"===e&&(0,s.jsx)(ei,{}),"dark"===e&&(0,s.jsx)(ec,{}),"system"===e&&(0,s.jsx)(eo,{}),(0,s.jsx)("span",{children:e.charAt(0).toUpperCase()+e.slice(1)})]},e))})]}),(0,s.jsxs)("div",{className:"settings-group",children:[(0,s.jsx)("label",{className:"settings-label",children:"Display Options"}),(0,s.jsx)(et,{label:"Compact mode",description:"Show more content in less space",checked:l.display.compactMode,onChange:e=>d("display","compactMode",e)}),(0,s.jsx)(et,{label:"Show timestamps",description:"Display time for each message",checked:l.display.showTimestamps,onChange:e=>d("display","showTimestamps",e)}),(0,s.jsx)(et,{label:"Show avatars",description:"Display agent avatars in messages",checked:l.display.showAvatars,onChange:e=>d("display","showAvatars",e)}),(0,s.jsx)(et,{label:"Enable animations",description:"Smooth transitions and effects",checked:l.display.animationsEnabled,onChange:e=>d("display","animationsEnabled",e)})]})]}),"notifications"===c&&(0,s.jsx)("div",{className:"settings-section",children:(0,s.jsxs)("div",{className:"settings-group",children:[(0,s.jsx)("label",{className:"settings-label",children:"Notification Preferences"}),(0,s.jsx)(et,{label:"Enable notifications",description:"Receive alerts for new messages",checked:l.notifications.enabled,onChange:e=>d("notifications","enabled",e)}),(0,s.jsx)(et,{label:"Sound alerts",description:"Play sound for new messages",checked:l.notifications.sound,onChange:e=>d("notifications","sound",e),disabled:!l.notifications.enabled}),(0,s.jsx)(et,{label:"Desktop notifications",description:"Show system notifications",checked:l.notifications.desktop,onChange:e=>d("notifications","desktop",e),disabled:!l.notifications.enabled}),(0,s.jsx)(et,{label:"Mentions only",description:"Only notify when mentioned",checked:l.notifications.mentionsOnly,onChange:e=>d("notifications","mentionsOnly",e),disabled:!l.notifications.enabled})]})}),"connection"===c&&(0,s.jsx)("div",{className:"settings-section",children:(0,s.jsxs)("div",{className:"settings-group",children:[(0,s.jsx)("label",{className:"settings-label",children:"Connection Settings"}),(0,s.jsx)(et,{label:"Auto-reconnect",description:"Automatically reconnect on disconnect",checked:l.connection.autoReconnect,onChange:e=>d("connection","autoReconnect",e)}),(0,s.jsxs)("div",{className:"settings-input-group",children:[(0,s.jsx)("label",{children:"Reconnect delay (ms)"}),(0,s.jsx)("input",{type:"number",className:"settings-input",value:l.connection.reconnectDelay,onChange:e=>d("connection","reconnectDelay",parseInt(e.target.value)||3e3),min:1e3,max:3e4,step:1e3,disabled:!l.connection.autoReconnect})]}),(0,s.jsxs)("div",{className:"settings-input-group",children:[(0,s.jsx)("label",{children:"Keep-alive interval (ms)"}),(0,s.jsx)("input",{type:"number",className:"settings-input",value:l.connection.keepAliveInterval,onChange:e=>d("connection","keepAliveInterval",parseInt(e.target.value)||3e4),min:5e3,max:12e4,step:5e3})]})]})})]}),(0,s.jsxs)("div",{className:"settings-footer",children:[i&&(0,s.jsx)("button",{className:"settings-reset-btn",onClick:i,children:"Reset to defaults"}),(0,s.jsx)("button",{className:"settings-done-btn",onClick:t,children:"Done"})]})]})}):null}function et(e){let{label:n,description:t,checked:a,onChange:l,disabled:r}=e;return(0,s.jsxs)("div",{className:"settings-toggle-option ".concat(r?"disabled":""),children:[(0,s.jsxs)("div",{className:"settings-toggle-info",children:[(0,s.jsx)("span",{className:"settings-toggle-label",children:n}),(0,s.jsx)("span",{className:"settings-toggle-desc",children:t})]}),(0,s.jsx)("button",{className:"settings-toggle ".concat(a?"on":""),onClick:()=>!r&&l(!a),disabled:r,role:"switch","aria-checked":a,children:(0,s.jsx)("span",{className:"settings-toggle-thumb"})})]})}function es(){return(0,s.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,s.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function ea(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("circle",{cx:"13.5",cy:"6.5",r:".5"}),(0,s.jsx)("circle",{cx:"17.5",cy:"10.5",r:".5"}),(0,s.jsx)("circle",{cx:"8.5",cy:"7.5",r:".5"}),(0,s.jsx)("circle",{cx:"6.5",cy:"12.5",r:".5"}),(0,s.jsx)("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.555C21.965 6.012 17.461 2 12 2z"})]})}function el(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),(0,s.jsx)("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})]})}function er(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("path",{d:"M5 12.55a11 11 0 0 1 14.08 0"}),(0,s.jsx)("path",{d:"M1.42 9a16 16 0 0 1 21.16 0"}),(0,s.jsx)("path",{d:"M8.53 16.11a6 6 0 0 1 6.95 0"}),(0,s.jsx)("line",{x1:"12",y1:"20",x2:"12.01",y2:"20"})]})}function ei(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"5"}),(0,s.jsx)("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),(0,s.jsx)("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),(0,s.jsx)("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),(0,s.jsx)("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),(0,s.jsx)("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),(0,s.jsx)("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),(0,s.jsx)("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),(0,s.jsx)("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})}function ec(){return(0,s.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,s.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})}function eo(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,s.jsx)("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",ry:"2"}),(0,s.jsx)("line",{x1:"8",y1:"21",x2:"16",y2:"21"}),(0,s.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"21"})]})}function ed(e,n){let t=e.match(/^@(\S*)/);return t&&n<=t[0].length?t[1]:null}function eu(e,n){let t=e.match(/^@\S*/);return t?"@".concat(n," ")+e.substring(t[0].length):e}function em(e){let{agents:n,inputValue:t,cursorPosition:l,onSelect:r,onClose:i,isVisible:c}=e,[o,m]=(0,a.useState)(0),h=(0,a.useRef)(null),x=(0,a.useMemo)(()=>ed(t,l),[t,l]),g=(0,a.useMemo)(()=>{if(null===x)return[];let e=x.toLowerCase(),t=[];return("*".includes(e)||"everyone".includes(e)||"all".includes(e)||"broadcast".includes(e)||""===e)&&t.push({name:"*",displayName:"@everyone",description:"Broadcast to all agents",isBroadcast:!0}),n.filter(n=>n.name.toLowerCase().includes(e)).forEach(e=>{t.push({name:e.name,displayName:"@".concat(e.name),description:e.status||"Agent"})}),t},[x,n]);(0,a.useEffect)(()=>{m(0)},[g.length]),(0,a.useEffect)(()=>{if(!h.current)return;let e=h.current.querySelector(".mention-item.selected");e&&e.scrollIntoView({block:"nearest"})},[o]);let p=(0,a.useCallback)(e=>{if(c&&0!==g.length)switch(e.key){case"ArrowDown":e.preventDefault(),m(e=>(e+1)%g.length);break;case"ArrowUp":e.preventDefault(),m(e=>(e-1+g.length)%g.length);break;case"Enter":case"Tab":e.preventDefault();let n=g[o];if(n){let e=eu(t,n.name);r(n.name,e)}break;case"Escape":e.preventDefault(),i()}},[c,g,o,t,r,i]);(0,a.useEffect)(()=>{if(c)return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[c,p]);let f=(0,a.useCallback)(e=>{let n=eu(t,e.name);r(e.name,n)},[t,r]);return c&&0!==g.length?(0,s.jsx)("div",{className:"mention-autocomplete",ref:h,children:g.map((e,n)=>(0,s.jsxs)("div",{className:"mention-item ".concat(n===o?"selected":""),onClick:()=>f(e),onMouseEnter:()=>m(n),children:[(0,s.jsx)("div",{className:"mention-avatar",style:{background:e.isBroadcast?"var(--accent-warning, #f59e0b)":d(e.name).primary},children:e.isBroadcast?"*":u(e.name)}),(0,s.jsxs)("div",{className:"mention-info",children:[(0,s.jsx)("span",{className:"mention-name",children:e.displayName}),(0,s.jsx)("span",{className:"mention-description",children:e.description})]})]},e.name))}):null}let eh={url:"",autoConnect:!0,reconnect:!0,maxReconnectAttempts:10,reconnectDelay:1e3},ex={async sendMessage(e){try{let n=await fetch("".concat("","/api/send"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),t=await n.json();if(n.ok&&t.success)return{success:!0};return{success:!1,error:t.error||"Failed to send message"}}catch(e){return{success:!1,error:"Network error"}}},async spawnAgent(e){try{let n=await fetch("".concat("","/api/spawn"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await n.json()}catch(n){return{success:!1,name:e.name,error:"Network error"}}},async getSpawnedAgents(){try{let e=await fetch("".concat("","/api/spawned")),n=await e.json();if(e.ok&&n.success)return{success:!0,data:{agents:n.agents||[]}};return{success:!1,error:n.error}}catch(e){return{success:!1,error:"Network error"}}},async releaseAgent(e){try{let n=await fetch("".concat("","/api/spawned/").concat(encodeURIComponent(e)),{method:"DELETE"}),t=await n.json();if(n.ok&&t.success)return{success:!0};return{success:!1,error:t.error}}catch(e){return{success:!1,error:"Network error"}}},async getData(){try{let e=await fetch("".concat("","/api/data")),n=await e.json();if(e.ok)return{success:!0,data:n};return{success:!1,error:"Failed to fetch data"}}catch(e){return{success:!1,error:"Network error"}}},async getBridgeData(){try{let e=await fetch("".concat("","/api/bridge")),n=await e.json();if(e.ok)return{success:!0,data:n};return{success:!1,error:"Failed to fetch bridge data"}}catch(e){return{success:!1,error:"Network error"}}},async getMetrics(){try{let e=await fetch("".concat("","/api/metrics")),n=await e.json();if(e.ok)return{success:!0,data:n};return{success:!1,error:"Failed to fetch metrics"}}catch(e){return{success:!1,error:"Network error"}}}};function eg(e){var n,t,l,r;let{wsUrl:i}=e,{data:c,isConnected:o,error:u}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={...eh,...e},t=n.url||function(){let e="https:"===window.location.protocol?"wss:":"ws:";return"".concat(e,"//").concat(window.location.host,"/ws")}(),[s,l]=(0,a.useState)(null),[r,i]=(0,a.useState)(!1),[c,o]=(0,a.useState)(null),d=(0,a.useRef)(null),u=(0,a.useRef)(0),m=(0,a.useRef)(null),h=(0,a.useCallback)(()=>{var e;if((null===(e=d.current)||void 0===e?void 0:e.readyState)!==WebSocket.OPEN)try{let e=new WebSocket(t);e.onopen=()=>{i(!0),o(null),u.current=0},e.onclose=()=>{if(i(!1),d.current=null,n.reconnect&&u.current<n.maxReconnectAttempts){let e=Math.min(n.reconnectDelay*Math.pow(2,u.current),3e4);u.current++,m.current=setTimeout(()=>{h()},e)}},e.onerror=e=>{o(Error("WebSocket connection error")),console.error("[useWebSocket] Error:",e)},e.onmessage=e=>{try{let n=JSON.parse(e.data);l(n)}catch(e){console.error("[useWebSocket] Failed to parse message:",e)}},d.current=e}catch(e){o(e instanceof Error?e:Error("Failed to create WebSocket"))}},[t,n.reconnect,n.maxReconnectAttempts,n.reconnectDelay]),x=(0,a.useCallback)(()=>{m.current&&(clearTimeout(m.current),m.current=null),d.current&&(d.current.close(),d.current=null),i(!1)},[]);return(0,a.useEffect)(()=>(n.autoConnect&&h(),()=>{x()}),[n.autoConnect,h,x]),{data:s,isConnected:r,error:c,connect:h,disconnect:x}}({url:i}),[h,g]=(0,a.useState)("local"),[f,j]=(0,a.useState)(!1),[y,v]=(0,a.useState)(!1),[k,w]=(0,a.useState)(null),[b,N]=(0,a.useState)(!1),[C,S]=(0,a.useState)(!1),[M,D]=(0,a.useState)(ee),{agents:E,groups:B,selectedAgent:W,selectAgent:R,searchQuery:T,setSearchQuery:O,totalCount:P,onlineCount:V,needsAttentionCount:z}=function(e){let{agents:n,initialSelected:t,initialSearchQuery:s=""}=e,[l,r]=(0,a.useState)(null!=t?t:null),[i,c]=(0,a.useState)(s),o=(0,a.useMemo)(()=>x(n,i),[n,i]),u=(0,a.useMemo)(()=>m(o),[o]),h=(0,a.useMemo)(()=>[...o].sort((e,n)=>e.name.localeCompare(n.name)),[o]),g=(0,a.useMemo)(()=>{var e;return null!==(e=n.find(e=>e.name===l))&&void 0!==e?e:null},[n,l]),f=(0,a.useMemo)(()=>{let e=p(n);return{totalCount:e.total,onlineCount:e.online,needsAttentionCount:e.needsAttention}},[n]),j=(0,a.useCallback)(e=>{r(e)},[]),y=(0,a.useCallback)(e=>n.find(n=>n.name===e),[n]),v=(0,a.useCallback)(e=>({...e,color:d(e.name)}),[]);return{agents:o,groups:u,sortedAgents:h,selectedAgent:g,selectAgent:j,searchQuery:i,setSearchQuery:c,...f,getAgentByName:y,getAgentWithColor:v}}({agents:null!==(l=null==c?void 0:c.agents)&&void 0!==l?l:[]}),{messages:H,currentChannel:K,setCurrentChannel:U,currentThread:_,setCurrentThread:q,sendMessage:J,isSending:G,sendError:Q}=function(e){let{messages:n,currentChannel:t="general"}=e,[s,l]=(0,a.useState)(t),[r,i]=(0,a.useState)(null),[c,o]=(0,a.useState)(!1),[d,u]=(0,a.useState)(null),m=(0,a.useMemo)(()=>"general"===s?n:n.filter(e=>e.from===s||e.to===s),[n,s]),h=(0,a.useCallback)(e=>n.filter(n=>n.thread===e),[n]),x=(0,a.useMemo)(()=>{let e=n.filter(e=>!e.isRead).length;return{totalCount:n.length,unreadCount:e}},[n]);return{messages:m,threadMessages:h,currentChannel:s,setCurrentChannel:l,currentThread:r,setCurrentThread:i,sendMessage:(0,a.useCallback)(async(e,n,t)=>{o(!0),u(null);try{let s=await fetch("/api/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({to:e,message:n,thread:t})}),a=await s.json();if(s.ok&&a.success)return!0;return u(a.error||"Failed to send message"),!1}catch(e){return u("Network error"),!1}finally{o(!1)}},[]),isSending:c,sendError:d,...x}}({messages:null!==(r=null==c?void 0:c.messages)&&void 0!==r?r:[]}),Y=!!(null==c?void 0:null===(t=c.fleet)||void 0===t?void 0:null===(n=t.servers)||void 0===n?void 0:n.length),$=(0,a.useCallback)(e=>{R(e.name),U(e.name)},[R,U]),X=(0,a.useCallback)(()=>{w(null),j(!0)},[]),et=(0,a.useCallback)(()=>{S(!0)},[]),es=(0,a.useCallback)(async e=>{v(!0),w(null);try{let n=await ex.spawnAgent({name:e.name,cli:e.command});if(!n.success)return w(n.error||"Failed to spawn agent"),!1;return!0}catch(e){return w(e instanceof Error?e.message:"Failed to spawn agent"),!1}finally{v(!1)}},[]),ea=(0,a.useCallback)(async e=>{if(e.isSpawned&&window.confirm('Are you sure you want to release agent "'.concat(e.name,'"?')))try{let n=await ex.releaseAgent(e.name);n.success||console.error("Failed to release agent:",n.error)}catch(e){console.error("Failed to release agent:",e)}},[]),el=(0,a.useCallback)(()=>{N(!0)},[]);return a.useEffect(()=>{let e=e=>{let n;n="system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e,document.documentElement.setAttribute("data-theme",n)};if(e(M.theme),"system"===M.theme){let n=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>e("system");return n.addEventListener("change",t),()=>n.removeEventListener("change",t)}},[M.theme]),a.useEffect(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key&&(e.preventDefault(),N(!0)),(e.metaKey||e.ctrlKey)&&e.shiftKey&&"s"===e.key&&(e.preventDefault(),X()),"Escape"===e.key&&(N(!1),j(!1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[X]),(0,s.jsxs)("div",{className:"dashboard-app",children:[(0,s.jsx)(A,{agents:E,selectedAgent:null==W?void 0:W.name,viewMode:h,isFleetAvailable:Y,isConnected:o,onAgentSelect:$,onViewModeChange:g,onSpawnClick:X,onReleaseClick:ea}),(0,s.jsxs)("main",{className:"dashboard-main",children:[(0,s.jsx)(L,{currentChannel:K,selectedAgent:W,onCommandPaletteOpen:el,onSettingsClick:et}),(0,s.jsx)("div",{className:"dashboard-content",children:u?(0,s.jsxs)("div",{className:"error-state",children:[(0,s.jsx)(ej,{}),(0,s.jsx)("h2",{children:"Connection Error"}),(0,s.jsx)("p",{children:u.message}),(0,s.jsx)("button",{onClick:()=>window.location.reload(),children:"Retry Connection"})]}):c?(0,s.jsx)("div",{className:"messages-container",children:(0,s.jsx)(F,{messages:H,currentChannel:K,onThreadClick:e=>q(e),highlightedMessageId:null!=_?_:void 0})}):(0,s.jsxs)("div",{className:"loading-state",children:[(0,s.jsx)(ef,{}),(0,s.jsx)("p",{children:"Connecting to dashboard..."})]})}),(0,s.jsx)("div",{className:"message-composer",children:(0,s.jsx)(ep,{recipient:"general"===K?"*":K,agents:E,onSend:J,isSending:G,error:Q})})]}),(0,s.jsx)(I,{isOpen:b,onClose:()=>N(!1),agents:E,onAgentSelect:$,onSpawnClick:X,onGeneralClick:()=>{R(null),U("general")}}),(0,s.jsx)(Z,{isOpen:f,onClose:()=>j(!1),onSpawn:es,existingAgents:E.map(e=>e.name),isSpawning:y,error:k}),(0,s.jsx)(en,{isOpen:C,onClose:()=>S(!1),settings:M,onSettingsChange:D,onResetSettings:()=>D(ee)})]})}function ep(e){let{recipient:n,agents:t,onSend:l,isSending:r,error:i}=e,[c,o]=(0,a.useState)(""),[d,u]=(0,a.useState)(0),[m,h]=(0,a.useState)(!1),x=(0,a.useRef)(null),g=async e=>{let t,s;if(e.preventDefault(),!c.trim()||r)return;let a=c.match(/^@(\S+)\s*([\s\S]*)/);if(a){let e=a[1];s=a[2]||"",t="*"===e||"everyone"===e.toLowerCase()||"all"===e.toLowerCase()?"*":e}else t=n,s=c;await l(t,s||c)&&(o(""),h(!1))};return(0,s.jsxs)("form",{className:"composer-form",onSubmit:g,children:[(0,s.jsxs)("div",{className:"composer-input-wrapper",children:[(0,s.jsx)(em,{agents:t,inputValue:c,cursorPosition:d,onSelect:(e,n)=>{o(n),h(!1),setTimeout(()=>{if(x.current){x.current.focus();let e=n.indexOf(" ")+1;x.current.setSelectionRange(e,e)}},0)},onClose:()=>h(!1),isVisible:m}),(0,s.jsx)("input",{ref:x,type:"text",className:"composer-input",placeholder:"Message ".concat("*"===n?"everyone":"@"+n,"... (type @ to mention)"),value:c,onChange:e=>{let n=e.target.value,t=e.target.selectionStart||0;o(n),u(t),h(null!==ed(n,t))},onSelect:e=>u(e.target.selectionStart||0),disabled:r})]}),(0,s.jsx)("button",{type:"submit",className:"composer-send",disabled:!c.trim()||r,children:r?"Sending...":"Send"}),i&&(0,s.jsx)("span",{className:"composer-error",children:i})]})}function ef(){return(0,s.jsx)("svg",{className:"spinner",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",fill:"none",strokeDasharray:"32",strokeLinecap:"round"})})}function ej(){return(0,s.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,s.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),(0,s.jsx)("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}function ey(){return(0,s.jsx)(eg,{})}}},function(e){e.O(0,[971,117,744],function(){return e(e.s=8440)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/34bb8e70353694d8.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-c81f7fd28659d64f.js"/><script src="/_next/static/chunks/fd9d1056-26bd8d656b496dba.js" async=""></script><script src="/_next/static/chunks/117-3bef7b19f3e60751.js" async=""></script><script src="/_next/static/chunks/main-app-bae2e535de00de50.js" async=""></script><script src="/_next/static/chunks/app/page-
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/34bb8e70353694d8.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-c81f7fd28659d64f.js"/><script src="/_next/static/chunks/fd9d1056-26bd8d656b496dba.js" async=""></script><script src="/_next/static/chunks/117-3bef7b19f3e60751.js" async=""></script><script src="/_next/static/chunks/main-app-bae2e535de00de50.js" async=""></script><script src="/_next/static/chunks/app/page-28a7722e809c2573.js" async=""></script><title>Agent Relay Dashboard</title><meta name="description" content="Fleet control dashboard for Agent Relay"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div class="dashboard-app"><aside class="sidebar"><div class="sidebar-header"><div class="sidebar-title"><h1>Agent Relay</h1><div class="connection-indicator disconnected" title="Disconnected"></div></div></div><div class="sidebar-search"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg><input type="text" placeholder="Search agents..." value=""/></div><div class="sidebar-content"><div class="agent-list-empty"><svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1"><circle cx="12" cy="8" r="5"></circle><path d="M20 21a8 8 0 1 0-16 0"></path></svg><p>No agents connected</p></div></div><div class="sidebar-footer"><a href="/metrics" class="nav-link metrics-link"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 3v18h18"></path><path d="M18 17V9"></path><path d="M13 17V5"></path><path d="M8 17v-3"></path></svg><span>Metrics</span></a><button class="spawn-btn"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>Spawn Agent</button></div></aside><main class="dashboard-main"><header class="header"><div class="header-left"><span class="channel-prefix">#</span><span class="channel-name">general</span><span class="channel-topic">All agent communications</span></div><div class="header-right"><button class="header-btn command-palette-btn" title="Command Palette (⌘K)"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg><span>Search</span><kbd>⌘K</kbd></button><button class="header-btn icon-btn" title="Settings"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg></button></div></header><div class="dashboard-content"><div class="loading-state"><svg class="spinner" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" stroke="currentColor" stroke-width="2" fill="none" stroke-dasharray="32" stroke-linecap="round"></circle></svg><p>Connecting to dashboard...</p></div></div><div class="message-composer"><form class="composer-form"><div class="composer-input-wrapper"><input type="text" class="composer-input" placeholder="Message everyone... (type @ to mention)" value=""/></div><button type="submit" class="composer-send" disabled="">Send</button></form></div></main></div><script src="/_next/static/chunks/webpack-c81f7fd28659d64f.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/34bb8e70353694d8.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[2846,[],\"\"]\n4:I[9107,[],\"ClientPageRoot\"]\n5:I[546,[\"931\",\"static/chunks/app/page-28a7722e809c2573.js\"],\"default\",1]\n6:I[4707,[],\"\"]\n7:I[6423,[],\"\"]\n9:I[1060,[],\"\"]\na:[]\n0:[\"$\",\"$L2\",null,{\"buildId\":\"15pBupHgVjgmNaba43jnO\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"\"],\"initialTree\":[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[\"$\",\"$L4\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$5\"}],null],null],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/34bb8e70353694d8.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyle"])</script><script>self.__next_f.push([1,"s\":[]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$L8\"],\"globalErrorComponent\":\"$9\",\"missingSlots\":\"$Wa\"}]\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Agent Relay Dashboard\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Fleet control dashboard for Agent Relay\"}]]\n3:null\n"])</script></body></html>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
2:I[9107,[],"ClientPageRoot"]
|
|
2
|
-
3:I[546,["931","static/chunks/app/page-
|
|
2
|
+
3:I[546,["931","static/chunks/app/page-28a7722e809c2573.js"],"default",1]
|
|
3
3
|
4:I[4707,[],""]
|
|
4
4
|
5:I[6423,[],""]
|
|
5
|
-
0:["
|
|
5
|
+
0:["15pBupHgVjgmNaba43jnO",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/34bb8e70353694d8.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]],null],null],["$L6",null]]]]
|
|
6
6
|
6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Agent Relay Dashboard"}],["$","meta","3",{"name":"description","content":"Fleet control dashboard for Agent Relay"}]]
|
|
7
7
|
1:null
|
|
@@ -512,4 +512,4 @@
|
|
|
512
512
|
grid-template-columns: repeat(2, 1fr);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
</style><div class="loading"><div class="spinner"></div><p>Loading metrics...</p></div></div><script src="/_next/static/chunks/webpack-c81f7fd28659d64f.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/34bb8e70353694d8.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[2846,[],\"\"]\n4:I[9107,[],\"ClientPageRoot\"]\n5:I[5804,[\"648\",\"static/chunks/648-6cf686106c891ad3.js\",\"860\",\"static/chunks/app/metrics/page-8aa9936bc6c771ab.js\"],\"default\",1]\n6:I[4707,[],\"\"]\n7:I[6423,[],\"\"]\n9:I[1060,[],\"\"]\na:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"
|
|
515
|
+
</style><div class="loading"><div class="spinner"></div><p>Loading metrics...</p></div></div><script src="/_next/static/chunks/webpack-c81f7fd28659d64f.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/34bb8e70353694d8.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[2846,[],\"\"]\n4:I[9107,[],\"ClientPageRoot\"]\n5:I[5804,[\"648\",\"static/chunks/648-6cf686106c891ad3.js\",\"860\",\"static/chunks/app/metrics/page-8aa9936bc6c771ab.js\"],\"default\",1]\n6:I[4707,[],\"\"]\n7:I[6423,[],\"\"]\n9:I[1060,[],\"\"]\na:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"15pBupHgVjgmNaba43jnO\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"metrics\"],\"initialTree\":[\"\",{\"children\":[\"metrics\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"metrics\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[\"$\",\"$L4\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$5\"}],null],null],null]},[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"metrics\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/34bb8e70353694d8.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$L8\"],\"globalErrorComponent\":\"$9\",\"missingSlots\":\"$Wa\"}]\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Agent Relay Dashboard\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Fleet control dashboard for Agent Relay\"}]]\n3:null\n"])</script></body></html>
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
3:I[5804,["648","static/chunks/648-6cf686106c891ad3.js","860","static/chunks/app/metrics/page-8aa9936bc6c771ab.js"],"default",1]
|
|
3
3
|
4:I[4707,[],""]
|
|
4
4
|
5:I[6423,[],""]
|
|
5
|
-
0:["
|
|
5
|
+
0:["15pBupHgVjgmNaba43jnO",[[["",{"children":["metrics",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["metrics",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","metrics","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/34bb8e70353694d8.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]],null],null],["$L6",null]]]]
|
|
6
6
|
6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Agent Relay Dashboard"}],["$","meta","3",{"name":"description","content":"Fleet control dashboard for Agent Relay"}]]
|
|
7
7
|
1:null
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|