@sleep2agi/agent-network-dashboard 0.5.7-preview.37 → 0.5.7-preview.38
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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/diagnostics/route-bundle-stats.json +5 -5
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +2 -2
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin.html +2 -2
- package/.next/server/app/admin.rsc +2 -2
- package/.next/server/app/admin.segments/_full.segment.rsc +2 -2
- package/.next/server/app/admin.segments/_head.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_index.segment.rsc +2 -2
- package/.next/server/app/admin.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/admin.segments/admin.segment.rsc +1 -1
- package/.next/server/app/index.html +2 -2
- package/.next/server/app/index.rsc +3 -3
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +2 -2
- package/.next/server/app/login.rsc +3 -3
- package/.next/server/app/login.segments/_full.segment.rsc +3 -3
- package/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/server/app/login.segments/_index.segment.rsc +2 -2
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/logs.html +2 -2
- package/.next/server/app/logs.rsc +2 -2
- package/.next/server/app/logs.segments/_full.segment.rsc +2 -2
- package/.next/server/app/logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_index.segment.rsc +2 -2
- package/.next/server/app/logs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/logs.segments/logs.segment.rsc +1 -1
- package/.next/server/app/messages/page_client-reference-manifest.js +1 -1
- package/.next/server/app/messages.html +2 -2
- package/.next/server/app/messages.rsc +3 -3
- package/.next/server/app/messages.segments/_full.segment.rsc +3 -3
- package/.next/server/app/messages.segments/_head.segment.rsc +1 -1
- package/.next/server/app/messages.segments/_index.segment.rsc +2 -2
- package/.next/server/app/messages.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/messages.segments/messages.segment.rsc +1 -1
- package/.next/server/app/node/page_client-reference-manifest.js +1 -1
- package/.next/server/app/node.html +2 -2
- package/.next/server/app/node.rsc +2 -2
- package/.next/server/app/node.segments/_full.segment.rsc +2 -2
- package/.next/server/app/node.segments/_head.segment.rsc +1 -1
- package/.next/server/app/node.segments/_index.segment.rsc +2 -2
- package/.next/server/app/node.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/node.segments/node.segment.rsc +1 -1
- package/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/nodes.html +2 -2
- package/.next/server/app/nodes.rsc +2 -2
- package/.next/server/app/nodes.segments/_full.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/_head.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_index.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/nodes.segment.rsc +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs.html +2 -2
- package/.next/server/app/server-logs.rsc +2 -2
- package/.next/server/app/server-logs.segments/_full.segment.rsc +2 -2
- package/.next/server/app/server-logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_index.segment.rsc +2 -2
- package/.next/server/app/server-logs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/server-logs.segment.rsc +1 -1
- package/.next/server/app/servers/page_client-reference-manifest.js +1 -1
- package/.next/server/app/servers.html +2 -2
- package/.next/server/app/servers.rsc +2 -2
- package/.next/server/app/servers.segments/_full.segment.rsc +2 -2
- package/.next/server/app/servers.segments/_head.segment.rsc +1 -1
- package/.next/server/app/servers.segments/_index.segment.rsc +2 -2
- package/.next/server/app/servers.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/servers.segments/servers/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/servers.segments/servers.segment.rsc +1 -1
- package/.next/server/app/settings/networks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/networks.html +2 -2
- package/.next/server/app/settings/networks.rsc +2 -2
- package/.next/server/app/settings/networks.segments/_full.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings.segment.rsc +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens.html +2 -2
- package/.next/server/app/settings/tokens.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/_full.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings.segment.rsc +1 -1
- package/.next/server/app/settings.html +2 -2
- package/.next/server/app/settings.rsc +3 -3
- package/.next/server/app/settings.segments/_full.segment.rsc +3 -3
- package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks.html +2 -2
- package/.next/server/app/tasks.rsc +2 -2
- package/.next/server/app/tasks.segments/_full.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_index.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/tasks.segment.rsc +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0sv~g.o._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0sv~g.o._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js +2 -2
- package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +2 -2
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/{07t173bdt_s93.js → 09aqa0t3~kdv-.js} +1 -1
- package/.next/static/chunks/{0djva3ldudpmd.css → 0b9yoa_xlcdj7.css} +1 -1
- package/.next/static/chunks/{04-1-l1wv3vlv.js → 0q0ngzf2wy2uu.js} +1 -1
- package/.next/static/chunks/{0-ifciv3y3y9v.js → 0t.g5hwhwocea.js} +1 -1
- package/.next/static/chunks/{07lk087gchb7~.js → 0xyds0k-llh6y.js} +2 -2
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/app/messages/page.tsx +89 -33
- package/package.json +1 -1
- /package/.next/static/{HFTVbWSVTa1wi4DDramY4 → RSm_bZeU9qWHnykS1m6iu}/_buildManifest.js +0 -0
- /package/.next/static/{HFTVbWSVTa1wi4DDramY4 → RSm_bZeU9qWHnykS1m6iu}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{HFTVbWSVTa1wi4DDramY4 → RSm_bZeU9qWHnykS1m6iu}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70286,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.5.7-preview.
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70286,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.5.7-preview.38"],70286)},48941,e=>{"use strict";var t=e.i(22381),r=e.i(23910),a=e.i(70286);e.s(["default",0,function(){let[e,s]=(0,r.useState)("login"),[n,o]=(0,r.useState)(""),[i,l]=(0,r.useState)(""),[c,d]=(0,r.useState)(!1),[x,m]=(0,r.useState)(""),[g,h]=(0,r.useState)(!1),u=async t=>{t.preventDefault(),h(!0),m("");try{let t=await fetch("/api/auth/v3",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,username:n,password:i})}),r=await t.json();if(r.ok){r.token&&sessionStorage.setItem("anet_v3_auth",JSON.stringify({user:r.user,token:r.token,networks:r.networks||[],currentNetwork:r.network_id||r.networks?.[0]?.network_id||""})),window.location.assign("/");return}m(r.error||"Login failed")}catch{m("Connection failed")}h(!1)};return(0,t.jsxs)("main",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 font-mono flex items-center justify-center relative overflow-hidden px-4 py-10 sm:py-16",children:[(0,t.jsx)("div",{className:"absolute inset-0 pointer-events-none anet-login-bg","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative w-full max-w-sm",children:[(0,t.jsxs)("div",{className:"text-center mb-7",children:[(0,t.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-4 rounded-2xl bg-[#111128] border border-[#2a2a4a] anet-login-mark",children:(0,t.jsxs)("svg",{className:"w-9 h-9",viewBox:"0 0 32 32","aria-hidden":!0,children:[(0,t.jsx)("circle",{cx:"16",cy:"16",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.25",className:"text-cyan-400 anet-login-mark-ring"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"10",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("line",{x1:"10",y1:"20",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("circle",{cx:"16",cy:"10",r:"3",fill:"currentColor",className:"text-cyan-400 anet-login-mark-node-a"}),(0,t.jsx)("circle",{cx:"10",cy:"20",r:"3",fill:"currentColor",className:"text-green-400 anet-login-mark-node-b"}),(0,t.jsx)("circle",{cx:"22",cy:"20",r:"3",fill:"currentColor",className:"text-violet-400 anet-login-mark-node-c"})]})}),(0,t.jsx)("h1",{className:"text-[22px] sm:text-2xl font-semibold text-white tracking-tight",children:"Agent Network"}),(0,t.jsx)("p",{className:"text-[13px] text-gray-500 mt-1.5 leading-snug",children:"login"===e?(0,t.jsxs)(t.Fragment,{children:["Welcome back · ",(0,t.jsx)("span",{className:"text-gray-600",children:"Tasks · Mesh · Messages"})]}):(0,t.jsxs)(t.Fragment,{children:["Create your account · ",(0,t.jsx)("span",{className:"text-gray-600",children:"Free preview · no credit card"})]})})]}),(0,t.jsx)("div",{className:"flex rounded-lg border border-[#2a2a4a] bg-[#111128] p-1 mb-4",children:["login","register"].map(r=>(0,t.jsx)("button",{type:"button",onClick:()=>{s(r),m("")},className:`flex-1 rounded-md px-3 py-2 text-sm transition-colors ${e===r?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-200"}`,children:"login"===r?"Sign in":"Register"},r))}),(0,t.jsxs)("form",{onSubmit:u,className:"border border-[#2a2a4a] bg-[#111128]/80 backdrop-blur-sm rounded-xl p-6 shadow-2xl shadow-black/30",children:[(0,t.jsx)("label",{htmlFor:"username",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Username"}),(0,t.jsx)("input",{id:"username",type:"text",value:n,onChange:e=>o(e.target.value),autoFocus:!0,placeholder:"Enter username",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 py-3 text-base sm:text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all mb-4"}),(0,t.jsx)("label",{htmlFor:"password",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Password"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{id:"password",type:c?"text":"password",value:i,onChange:e=>l(e.target.value),placeholder:"Enter password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 pr-11 py-3 text-base sm:text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all"}),(0,t.jsx)("button",{type:"button",onClick:()=>d(e=>!e),tabIndex:-1,"aria-label":c?"Hide password":"Show password",className:"absolute inset-y-0 right-0 flex items-center justify-center min-w-[44px] px-3 text-gray-600 hover:text-gray-300 transition-colors",children:c?(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),(0,t.jsx)("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}):(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})})]}),x&&(0,t.jsx)("div",{className:"mt-3 text-sm text-red-300 bg-red-500/5 border border-red-500/10 rounded-lg px-3 py-2",children:x}),(0,t.jsxs)("button",{type:"submit",disabled:g||!i||!n.trim(),className:"mt-5 w-full flex items-center justify-center gap-2 px-4 py-3 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 disabled:from-gray-800 disabled:to-gray-800 disabled:text-gray-600 text-white text-sm font-medium rounded-lg transition-all shadow-lg shadow-cyan-500/10 hover:shadow-cyan-500/20 disabled:shadow-none",children:[g&&(0,t.jsxs)("svg",{"aria-hidden":!0,className:"w-4 h-4 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",opacity:"0.25"}),(0,t.jsx)("path",{d:"M4 12a8 8 0 018-8",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),(0,t.jsx)("span",{children:g?"login"===e?"Signing in…":"Registering…":"login"===e?"Sign in":"Create account"})]})]}),(0,t.jsxs)("p",{className:"text-center text-[11px] text-gray-700 mt-6",children:["Sleep2AGI · Apache-2.0 · ",(0,t.jsx)("a",{href:"https://anet.sh",className:"hover:text-gray-500 transition-colors",children:"anet.sh"}),(0,t.jsx)("span",{className:"mx-1 text-gray-800",children:"·"}),(0,t.jsxs)("span",{className:"font-mono",title:"@sleep2agi/agent-network-dashboard",children:["v",a.DASHBOARD_VERSION]})]})]})]})}])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59276,e=>{"use strict";var s=e.i(12629),a=e.i(11449);let t=async e=>{let s=await fetch(e);if(401===s.status)throw window.location.assign("/login"),Error("unauthorized");return s.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function n(e,s){if(!s)return e;let a=e.includes("?")?"&":"?";return`${e}${a}network_id=${encodeURIComponent(s)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,s.default)("/api/anet/config",t,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:a}=(0,s.default)("/api/hub/health",t,r);return{health:e||null,error:a}},"useMessages",0,function(e=100){let{networkId:l}=(0,a.useNetworkId)(),{data:i,error:o,isLoading:c}=(0,s.default)(n(`/api/hub/messages?limit=${e}`,l),t,r);return{messages:i?.messages||[],error:o,isLoading:c}},"useSessions",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i,isLoading:o}=(0,s.default)(n("/api/hub/status",e),t,r);return{sessions:l?.sessions||[],hint:l?._hint,error:i,isLoading:o}},"useStats",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i}=(0,s.default)(n("/api/hub/stats",e),t,r);return{stats:l?.ok?l:null,error:i}},"useTasks",0,function(e){let{networkId:l}=(0,a.useNetworkId)(),i=new URLSearchParams({limit:"100",...e}).toString(),{data:o,error:c,isLoading:d}=(0,s.default)(n(`/api/hub/tasks?${i}`,l),t,r);return{tasks:o?.tasks||[],count:o?.count??0,source:o?.source,error:c,isLoading:d}}])},70286,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.5.7-preview.37"],70286)},65610,e=>{"use strict";var s=e.i(22381),a=e.i(23910),t=e.i(56839),r=e.i(59276),n=e.i(70286);e.s(["default",0,function(){let{config:e}=(0,r.useAnetConfig)(),{health:l}=(0,r.useHealth)(),[i,o]=(0,a.useState)(""),[c,d]=(0,a.useState)(""),[x,m]=(0,a.useState)(""),h="flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between",g="break-all sm:max-w-[320px] sm:text-right";return(0,s.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-white mb-3 lg:ml-0 ml-10",children:"Settings"}),(0,s.jsx)("nav",{className:"mb-8 flex flex-wrap gap-2 text-xs",children:[{href:"#connection",label:"Connection"},{href:"#account",label:"Account"},{href:"#resources",label:"Resources"}].map(e=>(0,s.jsx)("a",{href:e.href,className:"inline-flex min-h-[44px] items-center rounded-md border border-[#2a2a4a] bg-[#0a0a15]/60 px-3 py-2 text-gray-400 hover:border-cyan-500/50 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors",children:e.label},e.href))}),(0,s.jsxs)("div",{className:"max-w-2xl space-y-10",children:[(0,s.jsxs)("div",{id:"connection",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Connection"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"CommHub Connection"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500 shrink-0",children:"Hub URL"}),(0,s.jsx)("span",{className:`text-cyan-300 ${g}`,children:e?.hub||"not configured"})]}),(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Config Source"}),(0,s.jsx)("span",{className:`text-gray-300 ${g}`,children:e?.source==="file"?"Local file (~/.anet/config.json)":e?.source==="runtime-env"?"Vercel env vars":"Missing"})]}),(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Auth Token"}),(0,s.jsx)("span",{className:`${e?.tokenConfigured?"text-green-400":"text-red-400"} ${g}`,children:e?.tokenConfigured?`Configured (${e.tokenPreview})`:"Not configured"})]}),(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Server Auth"}),(0,s.jsx)("span",{className:`${l?.auth==="enabled"?"text-green-400":"text-yellow-400"} sm:text-right`,children:l?.auth||"--"})]}),e?.error&&(0,s.jsx)("div",{className:"border-t border-[#2a2a4a] pt-3 text-xs text-gray-600",children:e.error})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Server Info"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 ${g}`,children:l?.version||"--"})]}),(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Sessions"}),(0,s.jsx)("span",{className:`text-gray-300 ${g}`,children:l?.sessions??"--"})]}),(0,s.jsxs)("div",{className:h,children:[(0,s.jsxs)("span",{className:"text-gray-500",children:["SSE streams ",(0,s.jsx)("span",{className:"text-gray-600",children:"· server"})]}),(0,s.jsx)("span",{className:`text-gray-300 ${g}`,children:l?.sse_connections??"--"})]}),(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Uptime"}),(0,s.jsx)("span",{className:`text-gray-300 ${g}`,children:l?.uptime?`${Math.floor(l.uptime/3600)}h ${Math.floor(l.uptime%3600/60)}m`:"--"})]})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Dashboard"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 font-mono ${g}`,title:"From package.json @sleep2agi/agent-network-dashboard",children:n.DASHBOARD_VERSION})]}),(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Data Layer"}),(0,s.jsx)("span",{className:`text-gray-300 ${g}`,children:"SWR (5s refresh, 3s dedup)"})]}),(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Pages"}),(0,s.jsx)("span",{className:`text-gray-300 ${g}`,children:"Overview, Tasks, Nodes, Messages, Networks, Audit, Server Logs, Admin, Settings"})]})]})]})]}),(0,s.jsxs)("div",{id:"account",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Account"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Change Password"}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("input",{type:"password",value:i,onChange:e=>o(e.target.value),placeholder:"Current password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-base sm:text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("input",{type:"password",value:c,onChange:e=>d(e.target.value),placeholder:"New password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-base sm:text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("button",{onClick:async()=>{if(!i||!c)return;let e=sessionStorage.getItem("anet_v3_auth");if(!e)return void m("Not logged in with V3 auth");let{token:s}=JSON.parse(e),a=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"change_password",token:s,current_password:i,new_password:c})}),t=await a.json();if(m(t.ok?"Password changed":`Failed: ${t.error}`),t.ok){if(t.token){let s=JSON.parse(e);sessionStorage.setItem("anet_v3_auth",JSON.stringify({...s,token:t.token}))}o(""),d("")}setTimeout(()=>m(""),5e3)},disabled:!i||!c,className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Change Password"})]}),x&&(0,s.jsx)("div",{className:`mt-2 text-xs ${x.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:x})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Sign out"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Signing out clears your dashboard session cookie. You'll return to the login page."}),(0,s.jsx)("button",{onClick:async()=>{await fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),window.location.assign("/login")},className:"px-4 py-2 bg-transparent hover:bg-[#1a1a2a] text-gray-300 text-sm rounded-lg border border-[#2a2a4a] hover:border-[#3a3a5a] transition-colors",children:"Sign out"})]})]}),(0,s.jsxs)("div",{id:"resources",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Resources"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,s.jsxs)(t.default,{href:"/settings/tokens",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"API Tokens"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create and manage tokens for CLI access."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]}),(0,s.jsxs)(t.default,{href:"/settings/networks",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Networks"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create, manage, and delete agent networks."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]}),(0,s.jsxs)(t.default,{href:"/messages",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Messages"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Global timeline of CommHub messages across all agents."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Open →"})]}),(0,s.jsxs)(t.default,{href:"/logs",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Audit Log"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Authentication, token rotations, and admin actions."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Open →"})]}),(0,s.jsxs)(t.default,{href:"/server-logs",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Server Logs"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Live stdout / stderr from the CommHub server."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Open →"})]})]})]})]})]})}])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59276,e=>{"use strict";var s=e.i(12629),a=e.i(11449);let t=async e=>{let s=await fetch(e);if(401===s.status)throw window.location.assign("/login"),Error("unauthorized");return s.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function n(e,s){if(!s)return e;let a=e.includes("?")?"&":"?";return`${e}${a}network_id=${encodeURIComponent(s)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,s.default)("/api/anet/config",t,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:a}=(0,s.default)("/api/hub/health",t,r);return{health:e||null,error:a}},"useMessages",0,function(e=100){let{networkId:l}=(0,a.useNetworkId)(),{data:i,error:o,isLoading:c}=(0,s.default)(n(`/api/hub/messages?limit=${e}`,l),t,r);return{messages:i?.messages||[],error:o,isLoading:c}},"useSessions",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i,isLoading:o}=(0,s.default)(n("/api/hub/status",e),t,r);return{sessions:l?.sessions||[],hint:l?._hint,error:i,isLoading:o}},"useStats",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i}=(0,s.default)(n("/api/hub/stats",e),t,r);return{stats:l?.ok?l:null,error:i}},"useTasks",0,function(e){let{networkId:l}=(0,a.useNetworkId)(),i=new URLSearchParams({limit:"100",...e}).toString(),{data:o,error:c,isLoading:d}=(0,s.default)(n(`/api/hub/tasks?${i}`,l),t,r);return{tasks:o?.tasks||[],count:o?.count??0,source:o?.source,error:c,isLoading:d}}])},70286,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.5.7-preview.38"],70286)},65610,e=>{"use strict";var s=e.i(22381),a=e.i(23910),t=e.i(56839),r=e.i(59276),n=e.i(70286);e.s(["default",0,function(){let{config:e}=(0,r.useAnetConfig)(),{health:l}=(0,r.useHealth)(),[i,o]=(0,a.useState)(""),[c,d]=(0,a.useState)(""),[x,m]=(0,a.useState)(""),h="flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between",g="break-all sm:max-w-[320px] sm:text-right";return(0,s.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-white mb-3 lg:ml-0 ml-10",children:"Settings"}),(0,s.jsx)("nav",{className:"mb-8 flex flex-wrap gap-2 text-xs",children:[{href:"#connection",label:"Connection"},{href:"#account",label:"Account"},{href:"#resources",label:"Resources"}].map(e=>(0,s.jsx)("a",{href:e.href,className:"inline-flex min-h-[44px] items-center rounded-md border border-[#2a2a4a] bg-[#0a0a15]/60 px-3 py-2 text-gray-400 hover:border-cyan-500/50 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors",children:e.label},e.href))}),(0,s.jsxs)("div",{className:"max-w-2xl space-y-10",children:[(0,s.jsxs)("div",{id:"connection",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Connection"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"CommHub Connection"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500 shrink-0",children:"Hub URL"}),(0,s.jsx)("span",{className:`text-cyan-300 ${g}`,children:e?.hub||"not configured"})]}),(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Config Source"}),(0,s.jsx)("span",{className:`text-gray-300 ${g}`,children:e?.source==="file"?"Local file (~/.anet/config.json)":e?.source==="runtime-env"?"Vercel env vars":"Missing"})]}),(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Auth Token"}),(0,s.jsx)("span",{className:`${e?.tokenConfigured?"text-green-400":"text-red-400"} ${g}`,children:e?.tokenConfigured?`Configured (${e.tokenPreview})`:"Not configured"})]}),(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Server Auth"}),(0,s.jsx)("span",{className:`${l?.auth==="enabled"?"text-green-400":"text-yellow-400"} sm:text-right`,children:l?.auth||"--"})]}),e?.error&&(0,s.jsx)("div",{className:"border-t border-[#2a2a4a] pt-3 text-xs text-gray-600",children:e.error})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Server Info"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 ${g}`,children:l?.version||"--"})]}),(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Sessions"}),(0,s.jsx)("span",{className:`text-gray-300 ${g}`,children:l?.sessions??"--"})]}),(0,s.jsxs)("div",{className:h,children:[(0,s.jsxs)("span",{className:"text-gray-500",children:["SSE streams ",(0,s.jsx)("span",{className:"text-gray-600",children:"· server"})]}),(0,s.jsx)("span",{className:`text-gray-300 ${g}`,children:l?.sse_connections??"--"})]}),(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Uptime"}),(0,s.jsx)("span",{className:`text-gray-300 ${g}`,children:l?.uptime?`${Math.floor(l.uptime/3600)}h ${Math.floor(l.uptime%3600/60)}m`:"--"})]})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Dashboard"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 font-mono ${g}`,title:"From package.json @sleep2agi/agent-network-dashboard",children:n.DASHBOARD_VERSION})]}),(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Data Layer"}),(0,s.jsx)("span",{className:`text-gray-300 ${g}`,children:"SWR (5s refresh, 3s dedup)"})]}),(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Pages"}),(0,s.jsx)("span",{className:`text-gray-300 ${g}`,children:"Overview, Tasks, Nodes, Messages, Networks, Audit, Server Logs, Admin, Settings"})]})]})]})]}),(0,s.jsxs)("div",{id:"account",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Account"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Change Password"}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("input",{type:"password",value:i,onChange:e=>o(e.target.value),placeholder:"Current password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-base sm:text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("input",{type:"password",value:c,onChange:e=>d(e.target.value),placeholder:"New password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-base sm:text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("button",{onClick:async()=>{if(!i||!c)return;let e=sessionStorage.getItem("anet_v3_auth");if(!e)return void m("Not logged in with V3 auth");let{token:s}=JSON.parse(e),a=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"change_password",token:s,current_password:i,new_password:c})}),t=await a.json();if(m(t.ok?"Password changed":`Failed: ${t.error}`),t.ok){if(t.token){let s=JSON.parse(e);sessionStorage.setItem("anet_v3_auth",JSON.stringify({...s,token:t.token}))}o(""),d("")}setTimeout(()=>m(""),5e3)},disabled:!i||!c,className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Change Password"})]}),x&&(0,s.jsx)("div",{className:`mt-2 text-xs ${x.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:x})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Sign out"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Signing out clears your dashboard session cookie. You'll return to the login page."}),(0,s.jsx)("button",{onClick:async()=>{await fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),window.location.assign("/login")},className:"px-4 py-2 bg-transparent hover:bg-[#1a1a2a] text-gray-300 text-sm rounded-lg border border-[#2a2a4a] hover:border-[#3a3a5a] transition-colors",children:"Sign out"})]})]}),(0,s.jsxs)("div",{id:"resources",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Resources"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,s.jsxs)(t.default,{href:"/settings/tokens",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"API Tokens"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create and manage tokens for CLI access."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]}),(0,s.jsxs)(t.default,{href:"/settings/networks",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Networks"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create, manage, and delete agent networks."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]}),(0,s.jsxs)(t.default,{href:"/messages",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Messages"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Global timeline of CommHub messages across all agents."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Open →"})]}),(0,s.jsxs)(t.default,{href:"/logs",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Audit Log"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Authentication, token rotations, and admin actions."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Open →"})]}),(0,s.jsxs)(t.default,{href:"/server-logs",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Server Logs"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Live stdout / stderr from the CommHub server."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Open →"})]})]})]})]})]})}])}]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,3479,59746,e=>{"use strict";function t(e){if(!e)return null;let t=Date.parse(e.includes("T")?e:e.replace(" ","T")+"Z");return Number.isFinite(t)?t:null}function s(e){let s=t(e);if(null===s)return null;let a=Math.floor((Date.now()-s)/1e3);return a<0?"just now":a<60?`${a}s ago`:a<3600?`${Math.floor(a/60)}m ago`:a<86400?`${Math.floor(a/3600)}h ago`:`${Math.floor(a/86400)}d ago`}e.s(["parseHubTime",0,t,"relativeAgo",0,s],59746),e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),s=Math.floor(e%3600/60);return t>0?`${t}h ${s}m`:`${s}m`},"previewContent",0,function(e){return e&&e.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\s+/g," ").trim()||"--"},"timeAgo",0,function(e){return s(e)??"--"}],3479)},46228,e=>{"use strict";var t=e.i(22381);let s=[180,200,220,270,300,330,30,90];function a(e){let t=0;for(let s=0;s<e.length;s++)t=31*t+e.charCodeAt(s)>>>0;let a=s[t%s.length];return{bg:`hsl(${a} 55% 22%)`,ring:`hsl(${a} 60% 45%)`,text:`hsl(${a} 80% 78%)`}}function r(e){return e?(e.trim().match(/[\p{L}\p{N}]/u)?.[0]||e.trim()[0]||"·").toUpperCase():"·"}e.s(["AliasAvatar",0,function({alias:e,size:s=28,className:n=""}){if(/\bgrok\b|grok-build|grok测试员|grok-demo/i.test(e))return(0,t.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border border-emerald-500/45 bg-emerald-950/70 shrink-0 ${n}`,style:{width:s,height:s,backgroundImage:"url(/vendors/grok.svg)",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"68% 68%"},title:e,"aria-hidden":!0});let i=a(e),l=Math.max(9,Math.round(.42*s));return(0,t.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${n}`,style:{width:s,height:s,fontSize:l,backgroundColor:i.bg,borderColor:i.ring,color:i.text},title:e,"aria-hidden":!0,children:r(e)})},"aliasAvatarColors",0,a,"aliasInitial",0,r])},76161,e=>{"use strict";var t=e.i(22381),s=e.i(23910),a=e.i(56839);let r={nodes:{title:"No agents in this network",sub:"Agent sessions will appear here once they connect to the CommHub."},tasks:{title:"No tasks yet",sub:"Tasks will appear here when agents send them via CommHub."},messages:{title:"No messages",sub:"Messages between agents will appear here."},logs:{title:"No audit logs",sub:"Events will appear here when users register, login, or perform actions."},tokens:{title:"No API tokens",sub:"Create one to authenticate CLI tools and external integrations."},networks:{title:"No networks found",sub:"Create one or sign in with V3 auth to see your networks."},generic:{title:"Nothing here yet",sub:"Data will appear here once available."}};function n({variant:e,size:s}){let a={width:s,height:s},r={fill:"none",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"};switch(e){case"nodes":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"14",r:"4"}),(0,t.jsx)("circle",{cx:"14",cy:"44",r:"4"}),(0,t.jsx)("circle",{cx:"50",cy:"44",r:"4"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"14",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"50",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"18",y1:"44",x2:"46",y2:"44",strokeDasharray:"3 3",opacity:"0.6"})]})});case"tasks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("rect",{x:"14",y:"14",width:"36",height:"6",rx:"1.5"}),(0,t.jsx)("rect",{x:"14",y:"26",width:"36",height:"6",rx:"1.5",opacity:"0.6"}),(0,t.jsx)("rect",{x:"14",y:"38",width:"36",height:"6",rx:"1.5",opacity:"0.35"})]})});case"messages":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("path",{d:"M14 18 h36 a3 3 0 0 1 3 3 v18 a3 3 0 0 1 -3 3 h-18 l-8 6 v-6 h-10 a3 3 0 0 1 -3 -3 v-18 a3 3 0 0 1 3 -3 z"}),(0,t.jsx)("line",{x1:"22",y1:"28",x2:"42",y2:"28",opacity:"0.5"}),(0,t.jsx)("line",{x1:"22",y1:"34",x2:"36",y2:"34",opacity:"0.5"})]})});case"logs":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("path",{d:"M18 12 h22 l8 8 v32 a2 2 0 0 1 -2 2 h-28 a2 2 0 0 1 -2 -2 v-38 a2 2 0 0 1 2 -2 z"}),(0,t.jsx)("path",{d:"M40 12 v8 h8",opacity:"0.6"}),(0,t.jsx)("line",{x1:"24",y1:"32",x2:"40",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"24",y1:"38",x2:"40",y2:"38",opacity:"0.4"}),(0,t.jsx)("line",{x1:"24",y1:"44",x2:"34",y2:"44",opacity:"0.25"})]})});case"tokens":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"22",cy:"32",r:"8"}),(0,t.jsx)("line",{x1:"30",y1:"32",x2:"54",y2:"32"}),(0,t.jsx)("line",{x1:"44",y1:"32",x2:"44",y2:"38"}),(0,t.jsx)("line",{x1:"50",y1:"32",x2:"50",y2:"40"})]})});case"networks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"18"}),(0,t.jsx)("ellipse",{cx:"32",cy:"32",rx:"18",ry:"9",opacity:"0.55"}),(0,t.jsx)("line",{x1:"14",y1:"32",x2:"50",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"32",y1:"14",x2:"32",y2:"50",opacity:"0.55"})]})});default:return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"14",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("circle",{cx:"32",cy:"32",r:"3"})]})})}}function i({variant:e="generic",title:s,sub:l,cta:o,compact:c=!1}){let x=r[e],d=s??x.title,h=l??x.sub;return(0,t.jsxs)("div",{className:`text-center ${c?"py-8":"py-16"} px-4`,role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)(n,{variant:e,size:c?40:56})}),(0,t.jsx)("h3",{className:`font-medium text-gray-300 ${c?"text-sm":"text-base"}`,children:d}),h&&(0,t.jsx)("p",{className:`text-gray-500 ${c?"text-xs mt-1.5":"text-sm mt-2"} max-w-md mx-auto leading-relaxed`,children:h}),o&&(0,t.jsx)("div",{className:"mt-4",children:o.href?(0,t.jsxs)(a.default,{href:o.href,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,t.jsxs)("button",{onClick:o.onClick,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}function l({children:e}){return(0,t.jsx)("div",{className:"max-w-2xl mx-auto rounded-xl border border-[#2a2a4a] bg-[#111128] shadow-lg shadow-black/20",children:e})}function o({cmd:e}){let[a,r]=(0,s.useState)(!1),n=async()=>{try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),1800)}catch{}};return(0,t.jsxs)("div",{className:"anet-empty-cmd flex items-center gap-2 bg-[#0a0a15] border border-[#2a2a4a] rounded-lg pl-4 pr-1.5 py-1.5 text-xs sm:text-sm",children:[(0,t.jsx)("code",{className:"text-cyan-300 font-mono select-all",children:e}),(0,t.jsx)("button",{type:"button",onClick:n,"aria-label":a?"Copied":"Copy command",className:"shrink-0 rounded-md px-2 py-1.5 text-[11px] text-gray-500 hover:text-gray-200 hover:bg-[#1a1a2a] transition-colors",children:a?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-green-400",children:[(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M20 6 9 17l-5-5"})}),"Copied"]}):(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,t.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),"Copy"]})})]})}e.s(["EmptyState",0,i,"NodesEmptyState",0,function({hint:e,taskHistoryCount:s=0}){return e?.global_count?(0,t.jsx)(l,{children:(0,t.jsx)(i,{variant:"nodes",title:"No agents in this network",sub:`Server has ${e.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`})}):s>0?(0,t.jsx)(l,{children:(0,t.jsx)(i,{variant:"nodes",title:"No agents online",sub:`Every agent in this network is currently offline. ${s.toLocaleString()} task${1===s?"":"s"} in history — they may have finished their work or disconnected.`,cta:{label:"View task history",href:"/tasks"}})}):(0,t.jsx)(l,{children:(0,t.jsxs)("div",{className:"text-center py-16 px-4",role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)("svg",{viewBox:"0 0 64 64",width:56,height:56,children:(0,t.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",children:[(0,t.jsx)("rect",{x:"10",y:"20",width:"44",height:"28",rx:"2"}),(0,t.jsx)("rect",{x:"20",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,t.jsx)("rect",{x:"32",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,t.jsx)("rect",{x:"44",y:"32",width:"4",height:"8",opacity:"0.5"}),(0,t.jsx)("line",{x1:"10",y1:"26",x2:"54",y2:"26",opacity:"0.4"}),(0,t.jsx)("circle",{cx:"14",cy:"23",r:"0.8",fill:"currentColor"})]})})}),(0,t.jsx)("h3",{className:"font-medium text-gray-300 text-base",children:"Spin up your first agent"}),(0,t.jsx)("p",{className:"text-gray-500 text-sm mt-2 max-w-md mx-auto leading-relaxed",children:"Run this in a fresh terminal to register an agent with this CommHub:"}),(0,t.jsx)("div",{className:"mt-4 inline-block",children:(0,t.jsx)(o,{cmd:"npx --yes @sleep2agi/agent-network init"})}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsxs)("a",{href:"https://anet.sh",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-xs font-medium text-gray-500 hover:text-cyan-300",children:["Full quickstart guide",(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})})}])},59276,e=>{"use strict";var t=e.i(12629),s=e.i(11449);let a=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");return t.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function n(e,t){if(!t)return e;let s=e.includes("?")?"&":"?";return`${e}${s}network_id=${encodeURIComponent(t)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,t.default)("/api/anet/config",a,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/health",a,r);return{health:e||null,error:s}},"useMessages",0,function(e=100){let{networkId:i}=(0,s.useNetworkId)(),{data:l,error:o,isLoading:c}=(0,t.default)(n(`/api/hub/messages?limit=${e}`,i),a,r);return{messages:l?.messages||[],error:o,isLoading:c}},"useSessions",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:i,error:l,isLoading:o}=(0,t.default)(n("/api/hub/status",e),a,r);return{sessions:i?.sessions||[],hint:i?._hint,error:l,isLoading:o}},"useStats",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:i,error:l}=(0,t.default)(n("/api/hub/stats",e),a,r);return{stats:i?.ok?i:null,error:l}},"useTasks",0,function(e){let{networkId:i}=(0,s.useNetworkId)(),l=new URLSearchParams({limit:"100",...e}).toString(),{data:o,error:c,isLoading:x}=(0,t.default)(n(`/api/hub/tasks?${l}`,i),a,r);return{tasks:o?.tasks||[],count:o?.count??0,source:o?.source,error:c,isLoading:x}}])},94108,e=>{"use strict";var t=e.i(22381),s=e.i(23910),a=e.i(59276),r=e.i(3479),n=e.i(76161),i=e.i(46228);let l={task:"bg-green-500/10 text-green-300 border-green-500/20",message:"bg-blue-500/10 text-blue-300 border-blue-500/20",broadcast:"bg-purple-500/10 text-purple-300 border-purple-500/20",reply:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"};function o(e){return e?new Date(e.replace(" ","T")+"Z").getTime():0}function c(e){return"broadcast"===e.type?"broadcast":"dashboard"===(e.from_alias||"").toLowerCase()?"outgoing":"incoming"}function x(e,s){let a=e||"--",r=s.trim();if(!r||r.startsWith("from:"))return a;let n=a.toLowerCase().indexOf(r.toLowerCase());return n<0?a:(0,t.jsxs)(t.Fragment,{children:[a.slice(0,n),(0,t.jsx)("mark",{className:"bg-yellow-500/30 text-yellow-200 rounded px-0.5",children:a.slice(n,n+r.length)}),a.slice(n+r.length)]})}e.s(["default",0,function(){let{messages:e,isLoading:d}=(0,a.useMessages)(200),[h,m]=(0,s.useState)(""),[u,g]=(0,s.useState)(""),[p,y]=(0,s.useState)(!1),[b,j]=(0,s.useState)("timeline"),f=(0,s.useMemo)(()=>{let t=new Set;return e.forEach(e=>{let s=e.from_alias?.trim();s&&"dashboard"!==s.toLowerCase()&&t.add(s)}),[...t].slice(0,8)},[e]),v=(0,s.useMemo)(()=>{let t=u.trim().toLowerCase(),s=t.startsWith("from:")?t.slice(5).trim():"";return[...e].filter(e=>(!h||e.type===h)&&(s?(e.from_alias||"").toLowerCase().includes(s):!t||(e.from_alias||"").toLowerCase().includes(t)||(e.to_alias||"").toLowerCase().includes(t)||(e.content||"").toLowerCase().includes(t))).sort((e,t)=>o(e.created_at)-o(t.created_at))},[h,e,u]),w=(0,s.useMemo)(()=>{let e=new Map;return v.forEach(t=>{let s=t.from_alias||"?",a=t.to_alias||"?",r=[s,a].sort().join("↔"),n=e.get(r)||{participants:[s,a].sort(),messages:[],lastTime:0};n.messages.push(t),n.lastTime=Math.max(n.lastTime,o(t.created_at)),e.set(r,n)}),[...e.values()].sort((e,t)=>t.lastTime-e.lastTime)},[v]);return(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-4 sm:mb-6",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-white lg:ml-0 ml-10",children:"Messages"}),(0,t.jsx)("span",{className:"text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30 tabular-nums",title:v.length<e.length?`Showing ${v.length} of ${e.length} messages`:void 0,children:v.length<e.length?`${v.length} / ${e.length}`:e.length}),v.length>0&&(0,t.jsx)("button",{onClick:()=>{let e=v.map(e=>`**${e.from_alias||"?"}** → ${e.to_alias||"?"} (${e.type||"?"}) — ${e.created_at||""}
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,3479,59746,e=>{"use strict";function t(e){if(!e)return null;let t=Date.parse(e.includes("T")?e:e.replace(" ","T")+"Z");return Number.isFinite(t)?t:null}function s(e){let s=t(e);if(null===s)return null;let a=Math.floor((Date.now()-s)/1e3);return a<0?"just now":a<60?`${a}s ago`:a<3600?`${Math.floor(a/60)}m ago`:a<86400?`${Math.floor(a/3600)}h ago`:`${Math.floor(a/86400)}d ago`}e.s(["parseHubTime",0,t,"relativeAgo",0,s],59746),e.s(["formatUptime",0,function(e){let t=Math.floor(e/3600),s=Math.floor(e%3600/60);return t>0?`${t}h ${s}m`:`${s}m`},"previewContent",0,function(e){return e&&e.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\s+/g," ").trim()||"--"},"timeAgo",0,function(e){return s(e)??"--"}],3479)},46228,e=>{"use strict";var t=e.i(22381);let s=[180,200,220,270,300,330,30,90];function a(e){let t=0;for(let s=0;s<e.length;s++)t=31*t+e.charCodeAt(s)>>>0;let a=s[t%s.length];return{bg:`hsl(${a} 55% 22%)`,ring:`hsl(${a} 60% 45%)`,text:`hsl(${a} 80% 78%)`}}function r(e){return e?(e.trim().match(/[\p{L}\p{N}]/u)?.[0]||e.trim()[0]||"·").toUpperCase():"·"}e.s(["AliasAvatar",0,function({alias:e,size:s=28,className:n=""}){if(/\bgrok\b|grok-build|grok测试员|grok-demo/i.test(e))return(0,t.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border border-emerald-500/45 bg-emerald-950/70 shrink-0 ${n}`,style:{width:s,height:s,backgroundImage:"url(/vendors/grok.svg)",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"68% 68%"},title:e,"aria-hidden":!0});let i=a(e),l=Math.max(9,Math.round(.42*s));return(0,t.jsx)("span",{className:`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${n}`,style:{width:s,height:s,fontSize:l,backgroundColor:i.bg,borderColor:i.ring,color:i.text},title:e,"aria-hidden":!0,children:r(e)})},"aliasAvatarColors",0,a,"aliasInitial",0,r])},76161,e=>{"use strict";var t=e.i(22381),s=e.i(23910),a=e.i(56839);let r={nodes:{title:"No agents in this network",sub:"Agent sessions will appear here once they connect to the CommHub."},tasks:{title:"No tasks yet",sub:"Tasks will appear here when agents send them via CommHub."},messages:{title:"No messages",sub:"Messages between agents will appear here."},logs:{title:"No audit logs",sub:"Events will appear here when users register, login, or perform actions."},tokens:{title:"No API tokens",sub:"Create one to authenticate CLI tools and external integrations."},networks:{title:"No networks found",sub:"Create one or sign in with V3 auth to see your networks."},generic:{title:"Nothing here yet",sub:"Data will appear here once available."}};function n({variant:e,size:s}){let a={width:s,height:s},r={fill:"none",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"};switch(e){case"nodes":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"14",r:"4"}),(0,t.jsx)("circle",{cx:"14",cy:"44",r:"4"}),(0,t.jsx)("circle",{cx:"50",cy:"44",r:"4"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"14",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"32",y1:"18",x2:"50",y2:"40",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("line",{x1:"18",y1:"44",x2:"46",y2:"44",strokeDasharray:"3 3",opacity:"0.6"})]})});case"tasks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("rect",{x:"14",y:"14",width:"36",height:"6",rx:"1.5"}),(0,t.jsx)("rect",{x:"14",y:"26",width:"36",height:"6",rx:"1.5",opacity:"0.6"}),(0,t.jsx)("rect",{x:"14",y:"38",width:"36",height:"6",rx:"1.5",opacity:"0.35"})]})});case"messages":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("path",{d:"M14 18 h36 a3 3 0 0 1 3 3 v18 a3 3 0 0 1 -3 3 h-18 l-8 6 v-6 h-10 a3 3 0 0 1 -3 -3 v-18 a3 3 0 0 1 3 -3 z"}),(0,t.jsx)("line",{x1:"22",y1:"28",x2:"42",y2:"28",opacity:"0.5"}),(0,t.jsx)("line",{x1:"22",y1:"34",x2:"36",y2:"34",opacity:"0.5"})]})});case"logs":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("path",{d:"M18 12 h22 l8 8 v32 a2 2 0 0 1 -2 2 h-28 a2 2 0 0 1 -2 -2 v-38 a2 2 0 0 1 2 -2 z"}),(0,t.jsx)("path",{d:"M40 12 v8 h8",opacity:"0.6"}),(0,t.jsx)("line",{x1:"24",y1:"32",x2:"40",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"24",y1:"38",x2:"40",y2:"38",opacity:"0.4"}),(0,t.jsx)("line",{x1:"24",y1:"44",x2:"34",y2:"44",opacity:"0.25"})]})});case"tokens":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"22",cy:"32",r:"8"}),(0,t.jsx)("line",{x1:"30",y1:"32",x2:"54",y2:"32"}),(0,t.jsx)("line",{x1:"44",y1:"32",x2:"44",y2:"38"}),(0,t.jsx)("line",{x1:"50",y1:"32",x2:"50",y2:"40"})]})});case"networks":return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"18"}),(0,t.jsx)("ellipse",{cx:"32",cy:"32",rx:"18",ry:"9",opacity:"0.55"}),(0,t.jsx)("line",{x1:"14",y1:"32",x2:"50",y2:"32",opacity:"0.55"}),(0,t.jsx)("line",{x1:"32",y1:"14",x2:"32",y2:"50",opacity:"0.55"})]})});default:return(0,t.jsx)("svg",{viewBox:"0 0 64 64",...a,children:(0,t.jsxs)("g",{...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"14",strokeDasharray:"3 3",opacity:"0.6"}),(0,t.jsx)("circle",{cx:"32",cy:"32",r:"3"})]})})}}function i({variant:e="generic",title:s,sub:l,cta:o,compact:c=!1}){let x=r[e],d=s??x.title,h=l??x.sub;return(0,t.jsxs)("div",{className:`text-center ${c?"py-8":"py-16"} px-4`,role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)(n,{variant:e,size:c?40:56})}),(0,t.jsx)("h3",{className:`font-medium text-gray-300 ${c?"text-sm":"text-base"}`,children:d}),h&&(0,t.jsx)("p",{className:`text-gray-500 ${c?"text-xs mt-1.5":"text-sm mt-2"} max-w-md mx-auto leading-relaxed`,children:h}),o&&(0,t.jsx)("div",{className:"mt-4",children:o.href?(0,t.jsxs)(a.default,{href:o.href,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,t.jsxs)("button",{onClick:o.onClick,className:"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300",children:[o.label,(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})}function l({children:e}){return(0,t.jsx)("div",{className:"max-w-2xl mx-auto rounded-xl border border-[#2a2a4a] bg-[#111128] shadow-lg shadow-black/20",children:e})}function o({cmd:e}){let[a,r]=(0,s.useState)(!1),n=async()=>{try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),1800)}catch{}};return(0,t.jsxs)("div",{className:"anet-empty-cmd flex items-center gap-2 bg-[#0a0a15] border border-[#2a2a4a] rounded-lg pl-4 pr-1.5 py-1.5 text-xs sm:text-sm",children:[(0,t.jsx)("code",{className:"text-cyan-300 font-mono select-all",children:e}),(0,t.jsx)("button",{type:"button",onClick:n,"aria-label":a?"Copied":"Copy command",className:"shrink-0 rounded-md px-2 py-1.5 text-[11px] text-gray-500 hover:text-gray-200 hover:bg-[#1a1a2a] transition-colors",children:a?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-green-400",children:[(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M20 6 9 17l-5-5"})}),"Copied"]}):(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,t.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),"Copy"]})})]})}e.s(["EmptyState",0,i,"NodesEmptyState",0,function({hint:e,taskHistoryCount:s=0}){return e?.global_count?(0,t.jsx)(l,{children:(0,t.jsx)(i,{variant:"nodes",title:"No agents in this network",sub:`Server has ${e.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`})}):s>0?(0,t.jsx)(l,{children:(0,t.jsx)(i,{variant:"nodes",title:"No agents online",sub:`Every agent in this network is currently offline. ${s.toLocaleString()} task${1===s?"":"s"} in history — they may have finished their work or disconnected.`,cta:{label:"View task history",href:"/tasks"}})}):(0,t.jsx)(l,{children:(0,t.jsxs)("div",{className:"text-center py-16 px-4",role:"status",children:[(0,t.jsx)("div",{className:"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500","aria-hidden":!0,children:(0,t.jsx)("svg",{viewBox:"0 0 64 64",width:56,height:56,children:(0,t.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",children:[(0,t.jsx)("rect",{x:"10",y:"20",width:"44",height:"28",rx:"2"}),(0,t.jsx)("rect",{x:"20",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,t.jsx)("rect",{x:"32",y:"32",width:"6",height:"8",opacity:"0.5"}),(0,t.jsx)("rect",{x:"44",y:"32",width:"4",height:"8",opacity:"0.5"}),(0,t.jsx)("line",{x1:"10",y1:"26",x2:"54",y2:"26",opacity:"0.4"}),(0,t.jsx)("circle",{cx:"14",cy:"23",r:"0.8",fill:"currentColor"})]})})}),(0,t.jsx)("h3",{className:"font-medium text-gray-300 text-base",children:"Spin up your first agent"}),(0,t.jsx)("p",{className:"text-gray-500 text-sm mt-2 max-w-md mx-auto leading-relaxed",children:"Run this in a fresh terminal to register an agent with this CommHub:"}),(0,t.jsx)("div",{className:"mt-4 inline-block",children:(0,t.jsx)(o,{cmd:"npx --yes @sleep2agi/agent-network init"})}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsxs)("a",{href:"https://anet.sh",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-xs font-medium text-gray-500 hover:text-cyan-300",children:["Full quickstart guide",(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})})]})})}])},59276,e=>{"use strict";var t=e.i(12629),s=e.i(11449);let a=async e=>{let t=await fetch(e);if(401===t.status)throw window.location.assign("/login"),Error("unauthorized");return t.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function n(e,t){if(!t)return e;let s=e.includes("?")?"&":"?";return`${e}${s}network_id=${encodeURIComponent(t)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,t.default)("/api/anet/config",a,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:s}=(0,t.default)("/api/hub/health",a,r);return{health:e||null,error:s}},"useMessages",0,function(e=100){let{networkId:i}=(0,s.useNetworkId)(),{data:l,error:o,isLoading:c}=(0,t.default)(n(`/api/hub/messages?limit=${e}`,i),a,r);return{messages:l?.messages||[],error:o,isLoading:c}},"useSessions",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:i,error:l,isLoading:o}=(0,t.default)(n("/api/hub/status",e),a,r);return{sessions:i?.sessions||[],hint:i?._hint,error:l,isLoading:o}},"useStats",0,function(){let{networkId:e}=(0,s.useNetworkId)(),{data:i,error:l}=(0,t.default)(n("/api/hub/stats",e),a,r);return{stats:i?.ok?i:null,error:l}},"useTasks",0,function(e){let{networkId:i}=(0,s.useNetworkId)(),l=new URLSearchParams({limit:"100",...e}).toString(),{data:o,error:c,isLoading:x}=(0,t.default)(n(`/api/hub/tasks?${l}`,i),a,r);return{tasks:o?.tasks||[],count:o?.count??0,source:o?.source,error:c,isLoading:x}}])},94108,e=>{"use strict";var t=e.i(22381),s=e.i(23910),a=e.i(59276),r=e.i(3479),n=e.i(76161),i=e.i(46228);let l={task:"bg-green-500/10 text-green-300 border-green-500/20",message:"bg-blue-500/10 text-blue-300 border-blue-500/20",broadcast:"bg-purple-500/10 text-purple-300 border-purple-500/20",reply:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"};function o(e){return e?new Date(e.replace(" ","T")+"Z").getTime():0}function c(e){return"broadcast"===e.type?"broadcast":"dashboard"===(e.from_alias||"").toLowerCase()?"outgoing":"incoming"}function x(e,s){let a=e||"--",r=s.trim();if(!r||r.startsWith("from:"))return a;let n=a.toLowerCase().indexOf(r.toLowerCase());return n<0?a:(0,t.jsxs)(t.Fragment,{children:[a.slice(0,n),(0,t.jsx)("mark",{className:"bg-yellow-500/30 text-yellow-200 rounded px-0.5",children:a.slice(n,n+r.length)}),a.slice(n+r.length)]})}e.s(["default",0,function(){let{messages:e,isLoading:d}=(0,a.useMessages)(200),[h,m]=(0,s.useState)(""),[u,g]=(0,s.useState)(""),[p,y]=(0,s.useState)(!1),[b,j]=(0,s.useState)("timeline"),[f,v]=(0,s.useState)(!1),w=(0,s.useMemo)(()=>{let t=new Set;return e.forEach(e=>{let s=e.from_alias?.trim();s&&"dashboard"!==s.toLowerCase()&&t.add(s)}),[...t].slice(0,8)},[e]),k=(0,s.useMemo)(()=>{let t=u.trim().toLowerCase(),s=t.startsWith("from:")?t.slice(5).trim():"";return[...e].filter(e=>(!h||e.type===h)&&(s?(e.from_alias||"").toLowerCase().includes(s):!t||(e.from_alias||"").toLowerCase().includes(t)||(e.to_alias||"").toLowerCase().includes(t)||(e.content||"").toLowerCase().includes(t))).sort((e,t)=>o(e.created_at)-o(t.created_at))},[h,e,u]),N=(0,s.useMemo)(()=>{let e=new Map;return k.forEach(t=>{let s=t.from_alias||"?",a=t.to_alias||"?",r=[s,a].sort().join("↔"),n=e.get(r)||{participants:[s,a].sort(),messages:[],lastTime:0};n.messages.push(t),n.lastTime=Math.max(n.lastTime,o(t.created_at)),e.set(r,n)}),[...e.values()].sort((e,t)=>t.lastTime-e.lastTime)},[k]);return(0,t.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-4 sm:mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-white lg:ml-0 ml-10",children:"Messages"}),(0,t.jsx)("span",{className:"text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30 tabular-nums shrink-0",title:k.length<e.length?`Showing ${k.length} of ${e.length} messages`:void 0,children:k.length<e.length?`${k.length} / ${e.length}`:e.length}),k.length>0&&(0,t.jsx)("button",{onClick:()=>{let e=k.map(e=>`**${e.from_alias||"?"}** → ${e.to_alias||"?"} (${e.type||"?"}) — ${e.created_at||""}
|
|
2
2
|
|
|
3
3
|
${e.content||"--"}
|
|
4
4
|
|
|
5
5
|
---`).join("\n\n"),t=new Blob([`# Messages Export
|
|
6
6
|
|
|
7
|
-
${e}`],{type:"text/markdown"}),s=URL.createObjectURL(t),a=document.createElement("a");a.href=s,a.download=`messages-${new Date().toISOString().slice(0,10)}.md`,a.click(),URL.revokeObjectURL(s)},className:"text-xs text-gray-500 hover:text-gray-300 border border-gray-700/50 px-2.5 py-1 rounded-lg transition-colors",children:"Export MD"})]}),e.length>0&&(0,t.jsxs)("
|
|
7
|
+
${e}`],{type:"text/markdown"}),s=URL.createObjectURL(t),a=document.createElement("a");a.href=s,a.download=`messages-${new Date().toISOString().slice(0,10)}.md`,a.click(),URL.revokeObjectURL(s)},className:"text-xs text-gray-500 hover:text-gray-300 border border-gray-700/50 px-2.5 py-1 rounded-lg transition-colors shrink-0",children:"Export MD"})]}),e.length>0&&(0,t.jsxs)("button",{type:"button",onClick:()=>v(e=>!e),"aria-label":f?"Close search":"Open search","aria-pressed":f,title:f?"Close search":"Search messages",className:`relative shrink-0 inline-flex items-center justify-center rounded-full border w-9 h-9 transition-colors ${f||u?"border-cyan-500/40 bg-cyan-500/10 text-cyan-300":"border-[#2a2a4a] bg-[#111128] text-gray-400 hover:text-gray-200 hover:border-[#3a3a5a]"}`,children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),u&&!f&&(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute -top-0.5 -right-0.5 w-2 h-2 rounded-full bg-cyan-400 ring-2 ring-[#0a0a1a]"})]})]}),e.length>0&&(f||u)&&(0,t.jsxs)("div",{className:"mb-3 sm:mb-4 flex items-center gap-2",children:[(0,t.jsx)("input",{type:"text",value:u,onChange:e=>g(e.target.value),onKeyDown:e=>{"Escape"===e.key&&(g(""),v(!1))},placeholder:"Search from/to/content or use from:alias…",autoFocus:f,className:"flex-1 bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-base sm:text-sm text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none"}),(u||f)&&(0,t.jsx)("button",{type:"button",onClick:()=>{g(""),v(!1)},className:"shrink-0 text-xs text-gray-500 hover:text-gray-300 px-2 py-2","aria-label":"Clear and close search",children:"Cancel"})]}),e.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-3 mb-3",children:[(0,t.jsxs)("select",{value:h,onChange:e=>m(e.target.value),className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-base sm:text-sm text-white focus:border-blue-500/50 focus:outline-none",children:[(0,t.jsx)("option",{value:"",children:"All types"}),(0,t.jsx)("option",{value:"task",children:"task"}),(0,t.jsx)("option",{value:"message",children:"message"}),(0,t.jsx)("option",{value:"broadcast",children:"broadcast"}),(0,t.jsx)("option",{value:"reply",children:"reply"})]}),(0,t.jsx)("div",{className:"flex rounded-lg border border-[#2a2a4a] bg-[#111128] p-0.5",children:["timeline","grouped"].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>j(e),className:`rounded-md px-2.5 py-1.5 text-xs transition-colors ${b===e?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-200"}`,children:"timeline"===e?"Timeline":"Grouped"},e))}),(0,t.jsx)("button",{onClick:()=>y(!p),className:`text-xs px-3 py-2 rounded-lg border transition-colors ${p?"bg-yellow-500/10 text-yellow-300 border-yellow-500/20":"text-gray-500 border-gray-700/50 hover:text-gray-300"}`,children:p?"Debug ON":"Debug"})]}),w.length>0&&(0,t.jsxs)("div",{className:"mb-4 sm:mb-6 flex flex-wrap gap-2",children:[w.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>g(`from:${e}`),className:`rounded-full border px-3 py-1 text-xs transition-colors ${u===`from:${e}`?"border-cyan-500/30 bg-cyan-500/10 text-cyan-300":"border-[#2a2a4a] bg-[#111128] text-gray-400 hover:text-gray-200"}`,children:["from:",e]},e)),u.startsWith("from:")&&(0,t.jsx)("button",{type:"button",onClick:()=>g(""),className:"rounded-full border border-gray-700 px-3 py-1 text-xs text-gray-500 hover:text-gray-200",children:"Clear"})]}),d?(0,t.jsx)("div",{className:"animate-pulse space-y-3",children:[1,2,3,4,5].map(e=>(0,t.jsx)("div",{className:"h-20 rounded-2xl bg-gray-800/20"},e))}):0===k.length?(0,t.jsx)(n.EmptyState,{variant:"messages"}):"grouped"===b?(0,t.jsx)("div",{className:"space-y-4",children:N.map((e,s)=>(0,t.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl overflow-hidden",children:[(0,t.jsxs)("div",{className:"px-4 py-2.5 border-b border-[#2a2a4a] flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(i.AliasAvatar,{alias:e.participants[0],size:16}),(0,t.jsx)("span",{className:"text-sm text-gray-200 font-medium",children:e.participants[0]}),(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"↔"}),(0,t.jsx)(i.AliasAvatar,{alias:e.participants[1],size:16}),(0,t.jsx)("span",{className:"text-sm text-gray-200 font-medium",children:e.participants[1]})]}),(0,t.jsxs)("span",{className:"text-[10px] text-gray-600",children:[e.messages.length," messages"]})]}),(0,t.jsx)("div",{className:"px-4 py-2 space-y-2 max-h-64 overflow-y-auto",children:e.messages.map(e=>(0,t.jsxs)("div",{className:"flex items-start gap-2 text-xs py-1",children:[e.from_alias&&(0,t.jsx)(i.AliasAvatar,{alias:e.from_alias,size:14}),(0,t.jsx)("span",{className:"shrink-0 font-medium text-gray-200",children:e.from_alias}),(0,t.jsx)("span",{className:"text-gray-400 flex-1 truncate",title:e.content||"",children:(0,r.previewContent)(e.content).slice(0,120)}),(0,t.jsx)("span",{className:"text-[9px] text-gray-600 shrink-0",children:(0,r.timeAgo)(e.created_at||"")})]},e.id))})]},s))}):(0,t.jsx)("div",{className:"space-y-1",children:k.map((e,s)=>{var a;let n=k[s-1],d=!!n&&o(e.created_at)-o(n.created_at)>3e5,h=c(e),m=!!n&&!d&&c(n)===h&&(n.from_alias||"")===(e.from_alias||"")&&(n.to_alias||"")===(e.to_alias||""),g=e.from_alias||"?";return(0,t.jsxs)("div",{children:[d&&(0,t.jsxs)("div",{className:"my-2 sm:my-4 flex items-center gap-3",children:[(0,t.jsx)("div",{className:"h-px flex-1 bg-[#2a2a4a]"}),(0,t.jsx)("div",{className:"text-[11px] text-gray-600",children:(a=e.created_at)?new Date(a.replace(" ","T")+"Z").toLocaleString():"Time gap"}),(0,t.jsx)("div",{className:"h-px flex-1 bg-[#2a2a4a]"})]}),"broadcast"===h?(0,t.jsx)("div",{className:m?"mt-0.5 sm:mt-1":"mt-2 sm:mt-3",children:(0,t.jsxs)("div",{className:"rounded-2xl border border-purple-500/20 bg-purple-500/10 px-3 py-2 sm:px-4 sm:py-3 shadow-sm w-full",children:[(0,t.jsxs)("div",{className:"mb-1 sm:mb-2 flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-md border ${l[e.type||""]||"bg-gray-500/10 text-gray-400 border-gray-500/20"}`,children:e.type||"unknown"}),(0,t.jsx)("span",{className:"text-sm font-medium text-purple-200",children:g}),e.to_alias&&(0,t.jsxs)("span",{className:"text-xs text-purple-200/80",children:["to ",e.to_alias]}),"high"===e.priority&&(0,t.jsx)("span",{className:"text-xs text-red-400",children:"HIGH"}),(0,t.jsx)("span",{className:"ml-auto text-xs text-gray-500",children:e.created_at?(0,r.timeAgo)(e.created_at):"--"})]}),(0,t.jsx)("div",{className:"whitespace-pre-wrap break-words [overflow-wrap:anywhere] text-sm leading-snug sm:leading-relaxed text-gray-200",children:x(e.content,u)})]})}):(0,t.jsxs)("div",{className:`${m?"mt-0.5 sm:mt-1":"mt-2 sm:mt-3"} flex gap-2 ${"outgoing"===h?"flex-row-reverse":"flex-row"}`,children:[(0,t.jsx)("div",{className:"w-8 shrink-0 pt-1",children:!m&&(0,t.jsx)(i.AliasAvatar,{alias:g,size:32})}),(0,t.jsxs)("div",{className:`min-w-0 max-w-3xl rounded-2xl border px-3 py-2 sm:px-4 sm:py-3 shadow-sm ${"outgoing"===h?"border-green-500/20 bg-green-500/10":"border-blue-500/20 bg-blue-500/10"}`,children:[!m&&(0,t.jsxs)("div",{className:"mb-1 sm:mb-2 flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-md border ${l[e.type||""]||"bg-gray-500/10 text-gray-400 border-gray-500/20"}`,children:e.type||"unknown"}),(0,t.jsx)("span",{className:`text-sm font-medium ${"outgoing"===h?"text-green-300":"text-blue-300"}`,children:g}),(0,t.jsx)("span",{className:"text-xs text-gray-600",children:"→"}),(0,t.jsx)("span",{className:"text-sm text-gray-300",children:e.to_alias||"--"}),"high"===e.priority&&(0,t.jsx)("span",{className:"text-xs text-red-400",children:"HIGH"}),(0,t.jsx)("span",{className:"ml-auto text-xs text-gray-500",children:e.created_at?(0,r.timeAgo)(e.created_at):"--"})]}),(0,t.jsx)("div",{className:"whitespace-pre-wrap break-words [overflow-wrap:anywhere] text-sm leading-snug sm:leading-relaxed text-gray-200",children:x(e.content,u)}),m&&(0,t.jsx)("div",{className:"mt-1 text-[10px] text-gray-600 text-right",children:e.created_at?(0,r.timeAgo)(e.created_at):""}),p&&(0,t.jsxs)("div",{className:"mt-3 border-t border-white/10 pt-3 text-xs text-gray-500 space-y-1",children:[(0,t.jsxs)("div",{children:["ID: ",e.id]}),e.task_id&&(0,t.jsxs)("div",{children:["Task ID: ",e.task_id]}),(0,t.jsxs)("div",{children:["Created: ",e.created_at]})]})]})]})]},e.id)})})]})}])}]);
|
package/.next/trace
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
[{"name":"generate-buildid","duration":27303,"timestamp":2084711268819,"id":4,"parentId":1,"tags":{},"startTime":1780892683515,"traceId":"aa971554ef1ff07c"},{"name":"load-custom-routes","duration":770,"timestamp":2084711321629,"id":5,"parentId":1,"tags":{},"startTime":1780892683568,"traceId":"aa971554ef1ff07c"},{"name":"create-dist-dir","duration":244994,"timestamp":2084711322621,"id":6,"parentId":1,"tags":{},"startTime":1780892683569,"traceId":"aa971554ef1ff07c"},{"name":"clean","duration":1240090,"timestamp":2084711572451,"id":7,"parentId":1,"tags":{},"startTime":1780892683819,"traceId":"aa971554ef1ff07c"},{"name":"discover-routes","duration":18891,"timestamp":2084712886253,"id":8,"parentId":1,"tags":{},"startTime":1780892685133,"traceId":"aa971554ef1ff07c"},{"name":"create-root-mapping","duration":161,"timestamp":2084712905237,"id":9,"parentId":1,"tags":{},"startTime":1780892685152,"traceId":"aa971554ef1ff07c"},{"name":"generate-route-types","duration":1163657,"timestamp":2084712910154,"id":10,"parentId":1,"tags":{},"startTime":1780892685156,"traceId":"aa971554ef1ff07c"},{"name":"public-dir-conflict-check","duration":219,"timestamp":2084714096584,"id":11,"parentId":1,"tags":{},"startTime":1780892686343,"traceId":"aa971554ef1ff07c"},{"name":"generate-routes-manifest","duration":48607,"timestamp":2084714097063,"id":12,"parentId":1,"tags":{},"startTime":1780892686343,"traceId":"aa971554ef1ff07c"},{"name":"run-turbopack","duration":375837763,"timestamp":2084714475693,"id":14,"parentId":1,"tags":{},"startTime":1780892686722,"traceId":"aa971554ef1ff07c"},{"name":"turbopack-build-events","duration":126,"timestamp":2084722919781,"id":15,"parentId":1,"tags":{},"startTime":1780892695166,"traceId":"aa971554ef1ff07c"},{"name":"run-typescript","duration":310396696,"timestamp":2085091452287,"id":16,"parentId":1,"tags":{},"startTime":1780893063699,"traceId":"aa971554ef1ff07c"},{"name":"generate-required-server-files","duration":72227,"timestamp":2085401871626,"id":18,"parentId":1,"tags":{},"startTime":1780893374118,"traceId":"aa971554ef1ff07c"},{"name":"check-static-error-page","duration":390134,"timestamp":2085408166168,"id":20,"parentId":19,"tags":{},"startTime":1780893380412,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":14030315,"timestamp":2085408723339,"id":67,"parentId":22,"tags":{},"startTime":1780893380970,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":14542099,"timestamp":2085408211728,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1780893380458,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":17225755,"timestamp":2085408723493,"id":68,"parentId":25,"tags":{},"startTime":1780893380970,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":17651560,"timestamp":2085408297785,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1780893380544,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":17579548,"timestamp":2085408867535,"id":74,"parentId":32,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":18148120,"timestamp":2085408299051,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1780893380545,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":18135099,"timestamp":2085408867379,"id":73,"parentId":30,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":18703977,"timestamp":2085408298595,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1780893380545,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":18203981,"timestamp":2085408867801,"id":75,"parentId":33,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":18772682,"timestamp":2085408299207,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1780893380545,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":18418394,"timestamp":2085408867899,"id":76,"parentId":34,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":18987055,"timestamp":2085408299334,"id":34,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1780893380546,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":18521909,"timestamp":2085408867971,"id":78,"parentId":36,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":19017857,"timestamp":2085408372125,"id":36,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1780893380618,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":18522259,"timestamp":2085408867944,"id":77,"parentId":35,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":19090782,"timestamp":2085408299458,"id":35,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1780893380546,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":18651109,"timestamp":2085408868024,"id":79,"parentId":37,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":19146731,"timestamp":2085408372494,"id":37,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1780893380619,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":18768683,"timestamp":2085408868051,"id":81,"parentId":39,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":19264069,"timestamp":2085408372748,"id":39,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1780893380619,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":18801804,"timestamp":2085408868042,"id":80,"parentId":38,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":19297312,"timestamp":2085408372635,"id":38,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1780893380619,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":19011820,"timestamp":2085408868075,"id":83,"parentId":43,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":19498888,"timestamp":2085408381135,"id":43,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1780893380627,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":19076727,"timestamp":2085408868083,"id":84,"parentId":44,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":19563603,"timestamp":2085408381297,"id":44,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1780893380628,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":19148845,"timestamp":2085408868095,"id":85,"parentId":45,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":19635616,"timestamp":2085408381422,"id":45,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1780893380628,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":19199488,"timestamp":2085408868063,"id":82,"parentId":41,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":19687135,"timestamp":2085408380509,"id":41,"parentId":19,"tags":{"page":"/api/hub/server/[hostname]/health"},"startTime":1780893380627,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":19294317,"timestamp":2085408868106,"id":86,"parentId":46,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":19780957,"timestamp":2085408381550,"id":46,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1780893380628,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":19562764,"timestamp":2085408722809,"id":66,"parentId":21,"tags":{},"startTime":1780893380969,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":20075582,"timestamp":2085408210096,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1780893380456,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":19417767,"timestamp":2085408868118,"id":87,"parentId":47,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":19904248,"timestamp":2085408381689,"id":47,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1780893380628,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":19648018,"timestamp":2085408868126,"id":88,"parentId":48,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":20134407,"timestamp":2085408381832,"id":48,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1780893380628,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":19648371,"timestamp":2085408868150,"id":90,"parentId":50,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":20086325,"timestamp":2085408430240,"id":50,"parentId":19,"tags":{"page":"/api/hub/upload"},"startTime":1780893380677,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":19834068,"timestamp":2085408723614,"id":69,"parentId":26,"tags":{},"startTime":1780893380970,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":20259733,"timestamp":2085408298055,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1780893380544,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":19699365,"timestamp":2085408868158,"id":91,"parentId":51,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":20137130,"timestamp":2085408430475,"id":51,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1780893380677,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":19896372,"timestamp":2085408958495,"id":94,"parentId":31,"tags":{},"startTime":1780893381205,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":20556261,"timestamp":2085408298711,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1780893380545,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":20277357,"timestamp":2085408723732,"id":70,"parentId":27,"tags":{},"startTime":1780893380970,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":20702984,"timestamp":2085408298194,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1780893380544,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":20326693,"timestamp":2085408745133,"id":72,"parentId":29,"tags":{},"startTime":1780893380991,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":20773471,"timestamp":2085408298440,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1780893380545,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":20316217,"timestamp":2085408957269,"id":93,"parentId":24,"tags":{},"startTime":1780893381204,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":20990299,"timestamp":2085408283280,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1780893380530,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":20549964,"timestamp":2085408723860,"id":71,"parentId":28,"tags":{},"startTime":1780893380970,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":20975536,"timestamp":2085408298328,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1780893380545,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":20912549,"timestamp":2085408868173,"id":92,"parentId":54,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":21317266,"timestamp":2085408463544,"id":54,"parentId":19,"tags":{"page":"/manifest.webmanifest"},"startTime":1780893380710,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":20990276,"timestamp":2085408970242,"id":95,"parentId":40,"tags":{},"startTime":1780893381217,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":21587762,"timestamp":2085408372842,"id":40,"parentId":19,"tags":{"page":"/api/hub/server/[hostname]/agents"},"startTime":1780893380619,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":21452967,"timestamp":2085408971338,"id":96,"parentId":42,"tags":{},"startTime":1780893381218,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":22043690,"timestamp":2085408380736,"id":42,"parentId":19,"tags":{"page":"/api/hub/servers"},"startTime":1780893380627,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":21809340,"timestamp":2085408868138,"id":89,"parentId":49,"tags":{},"startTime":1780893381114,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":22295611,"timestamp":2085408381960,"id":49,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1780893380628,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":21038840,"timestamp":2085409868737,"id":98,"parentId":52,"tags":{},"startTime":1780893382115,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":22476690,"timestamp":2085408430970,"id":52,"parentId":19,"tags":{"page":"/login"},"startTime":1780893380677,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":21219558,"timestamp":2085409868814,"id":103,"parentId":59,"tags":{},"startTime":1780893382115,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":22618198,"timestamp":2085408470282,"id":59,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1780893380717,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":21251507,"timestamp":2085409868850,"id":104,"parentId":60,"tags":{},"startTime":1780893382115,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":22613779,"timestamp":2085408506664,"id":60,"parentId":19,"tags":{"page":"/servers"},"startTime":1780893380753,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":21693206,"timestamp":2085409868874,"id":106,"parentId":63,"tags":{},"startTime":1780893382115,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":23053044,"timestamp":2085408524092,"id":63,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1780893380770,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":21724276,"timestamp":2085409868863,"id":105,"parentId":61,"tags":{},"startTime":1780893382115,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":23086268,"timestamp":2085408506961,"id":61,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1780893380753,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":21976482,"timestamp":2085409868772,"id":100,"parentId":55,"tags":{},"startTime":1780893382115,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":23381648,"timestamp":2085408463685,"id":55,"parentId":19,"tags":{"page":"/messages"},"startTime":1780893380710,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":22132308,"timestamp":2085409868896,"id":108,"parentId":65,"tags":{},"startTime":1780893382115,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":23445429,"timestamp":2085408555858,"id":65,"parentId":19,"tags":{"page":"/tasks"},"startTime":1780893380802,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":22228609,"timestamp":2085409868908,"id":109,"parentId":58,"tags":{},"startTime":1780893382115,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":23628044,"timestamp":2085408469554,"id":58,"parentId":19,"tags":{"page":"/"},"startTime":1780893380716,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":22347741,"timestamp":2085409868886,"id":107,"parentId":64,"tags":{},"startTime":1780893382115,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":23661162,"timestamp":2085408555537,"id":64,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1780893380802,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":22451644,"timestamp":2085409868656,"id":97,"parentId":23,"tags":{},"startTime":1780893382115,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":24037506,"timestamp":2085408282882,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1780893380529,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":22506810,"timestamp":2085409868759,"id":99,"parentId":53,"tags":{},"startTime":1780893382115,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":23912394,"timestamp":2085408463254,"id":53,"parentId":19,"tags":{"page":"/logs"},"startTime":1780893380710,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":22536757,"timestamp":2085409868920,"id":110,"parentId":62,"tags":{},"startTime":1780893382115,"traceId":"aa971554ef1ff07c"},{"name":"check-page","duration":23882359,"timestamp":2085408523400,"id":62,"parentId":19,"tags":{"page":"/settings"},"startTime":1780893380770,"traceId":"aa971554ef1ff07c"},{"name":"is-page-static","duration":22611717,"timestamp":2085409868784,"id":101,"parentId":56,"tags":{},"startTime":1780893382115,"traceId":"aa971554ef1ff07c"}]
|
|
2
|
-
[{"name":"check-page","duration":
|
|
1
|
+
[{"name":"generate-buildid","duration":401,"timestamp":2086467552554,"id":4,"parentId":1,"tags":{},"startTime":1780894439799,"traceId":"8ff6404efde47814"},{"name":"load-custom-routes","duration":11691,"timestamp":2086467553211,"id":5,"parentId":1,"tags":{},"startTime":1780894439799,"traceId":"8ff6404efde47814"},{"name":"create-dist-dir","duration":5926,"timestamp":2086467565153,"id":6,"parentId":1,"tags":{},"startTime":1780894439811,"traceId":"8ff6404efde47814"},{"name":"clean","duration":430912,"timestamp":2086467576529,"id":7,"parentId":1,"tags":{},"startTime":1780894439823,"traceId":"8ff6404efde47814"},{"name":"discover-routes","duration":200497,"timestamp":2086470154463,"id":8,"parentId":1,"tags":{},"startTime":1780894442401,"traceId":"8ff6404efde47814"},{"name":"create-root-mapping","duration":247,"timestamp":2086470355096,"id":9,"parentId":1,"tags":{},"startTime":1780894442601,"traceId":"8ff6404efde47814"},{"name":"generate-route-types","duration":295018,"timestamp":2086470395084,"id":10,"parentId":1,"tags":{},"startTime":1780894442641,"traceId":"8ff6404efde47814"},{"name":"public-dir-conflict-check","duration":161,"timestamp":2086470690254,"id":11,"parentId":1,"tags":{},"startTime":1780894442937,"traceId":"8ff6404efde47814"},{"name":"generate-routes-manifest","duration":149955,"timestamp":2086470690621,"id":12,"parentId":1,"tags":{},"startTime":1780894442937,"traceId":"8ff6404efde47814"},{"name":"run-turbopack","duration":326490727,"timestamp":2086470966240,"id":14,"parentId":1,"tags":{},"startTime":1780894443213,"traceId":"8ff6404efde47814"},{"name":"turbopack-build-events","duration":120,"timestamp":2086475648796,"id":15,"parentId":1,"tags":{},"startTime":1780894447895,"traceId":"8ff6404efde47814"},{"name":"run-typescript","duration":289986292,"timestamp":2086798583251,"id":16,"parentId":1,"tags":{},"startTime":1780894770830,"traceId":"8ff6404efde47814"},{"name":"generate-required-server-files","duration":78183,"timestamp":2087088570491,"id":18,"parentId":1,"tags":{},"startTime":1780895060817,"traceId":"8ff6404efde47814"},{"name":"check-static-error-page","duration":888562,"timestamp":2087093790029,"id":20,"parentId":19,"tags":{},"startTime":1780895066036,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":14171257,"timestamp":2087094686527,"id":67,"parentId":22,"tags":{},"startTime":1780895066933,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":14872711,"timestamp":2087093985234,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1780895066232,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":17648765,"timestamp":2087094686791,"id":69,"parentId":26,"tags":{},"startTime":1780895066933,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":18127548,"timestamp":2087094208117,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1780895066454,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":18023846,"timestamp":2087094763913,"id":74,"parentId":32,"tags":{},"startTime":1780895067010,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":18482698,"timestamp":2087094305146,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1780895066551,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":18615974,"timestamp":2087094767313,"id":75,"parentId":33,"tags":{},"startTime":1780895067014,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":19077901,"timestamp":2087094305480,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1780895066552,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":18900760,"timestamp":2087094763813,"id":73,"parentId":30,"tags":{},"startTime":1780895067010,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":19455982,"timestamp":2087094208690,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1780895066455,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":19114914,"timestamp":2087094767436,"id":77,"parentId":35,"tags":{},"startTime":1780895067014,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":19576655,"timestamp":2087094305788,"id":35,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1780895066552,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":19167830,"timestamp":2087094767407,"id":76,"parentId":34,"tags":{},"startTime":1780895067014,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":19629677,"timestamp":2087094305656,"id":34,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1780895066552,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":19475252,"timestamp":2087094767454,"id":78,"parentId":36,"tags":{},"startTime":1780895067014,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":19910522,"timestamp":2087094332273,"id":36,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1780895066579,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":19508362,"timestamp":2087094767486,"id":79,"parentId":37,"tags":{},"startTime":1780895067014,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":19943300,"timestamp":2087094332644,"id":37,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1780895066579,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":19856265,"timestamp":2087094767505,"id":80,"parentId":38,"tags":{},"startTime":1780895067014,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":20291068,"timestamp":2087094332782,"id":38,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1780895066579,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":19889529,"timestamp":2087094767516,"id":81,"parentId":39,"tags":{},"startTime":1780895067014,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":20324247,"timestamp":2087094332891,"id":39,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1780895066579,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":20524077,"timestamp":2087094767548,"id":83,"parentId":43,"tags":{},"startTime":1780895067014,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":20828018,"timestamp":2087094463693,"id":43,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1780895066710,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":20885886,"timestamp":2087094767563,"id":84,"parentId":44,"tags":{},"startTime":1780895067014,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":21189659,"timestamp":2087094463879,"id":44,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1780895066710,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":20886310,"timestamp":2087094767531,"id":82,"parentId":41,"tags":{},"startTime":1780895067014,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":21266763,"timestamp":2087094387131,"id":41,"parentId":19,"tags":{"page":"/api/hub/server/[hostname]/health"},"startTime":1780895066633,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":21308400,"timestamp":2087094767575,"id":85,"parentId":45,"tags":{},"startTime":1780895067014,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":21612080,"timestamp":2087094463992,"id":45,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1780895066710,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":21308658,"timestamp":2087094767590,"id":86,"parentId":46,"tags":{},"startTime":1780895067014,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":21612141,"timestamp":2087094464141,"id":46,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1780895066710,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":21475955,"timestamp":2087094767616,"id":88,"parentId":48,"tags":{},"startTime":1780895067014,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":21779351,"timestamp":2087094464327,"id":48,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1780895066711,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":21476255,"timestamp":2087094767605,"id":87,"parentId":47,"tags":{},"startTime":1780895067014,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":21779672,"timestamp":2087094464227,"id":47,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1780895066710,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":21729715,"timestamp":2087094767645,"id":90,"parentId":50,"tags":{},"startTime":1780895067014,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":22032980,"timestamp":2087094464463,"id":50,"parentId":19,"tags":{"page":"/api/hub/upload"},"startTime":1780895066711,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":21945195,"timestamp":2087094767631,"id":89,"parentId":49,"tags":{},"startTime":1780895067014,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":22248508,"timestamp":2087094464396,"id":49,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1780895066711,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":22057715,"timestamp":2087094767660,"id":91,"parentId":51,"tags":{},"startTime":1780895067014,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":22360925,"timestamp":2087094464538,"id":51,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1780895066711,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":22820149,"timestamp":2087094687179,"id":71,"parentId":28,"tags":{},"startTime":1780895066933,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":23299030,"timestamp":2087094208416,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1780895066455,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":22865074,"timestamp":2087094919653,"id":93,"parentId":24,"tags":{},"startTime":1780895067166,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":23767921,"timestamp":2087094016904,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1780895066263,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":23099051,"timestamp":2087094686067,"id":66,"parentId":21,"tags":{},"startTime":1780895066932,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":23926873,"timestamp":2087093858308,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1780895066105,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":23180352,"timestamp":2087094767671,"id":92,"parentId":54,"tags":{},"startTime":1780895067014,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":23487763,"timestamp":2087094465438,"id":54,"parentId":19,"tags":{"page":"/manifest.webmanifest"},"startTime":1780895066712,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":23283011,"timestamp":2087094763516,"id":72,"parentId":29,"tags":{},"startTime":1780895067010,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":23838078,"timestamp":2087094208532,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1780895066455,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":23457904,"timestamp":2087094686673,"id":68,"parentId":25,"tags":{},"startTime":1780895066933,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":23936889,"timestamp":2087094207771,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1780895066454,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":23740254,"timestamp":2087094920896,"id":94,"parentId":31,"tags":{},"startTime":1780895067167,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":24452436,"timestamp":2087094208810,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1780895066455,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":23711647,"timestamp":2087094968542,"id":95,"parentId":40,"tags":{},"startTime":1780895067215,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":24354951,"timestamp":2087094333018,"id":40,"parentId":19,"tags":{"page":"/api/hub/server/[hostname]/agents"},"startTime":1780895066579,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":24813338,"timestamp":2087094686910,"id":70,"parentId":27,"tags":{},"startTime":1780895066933,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":25292060,"timestamp":2087094208281,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1780895066455,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":24742998,"timestamp":2087095055954,"id":96,"parentId":42,"tags":{},"startTime":1780895067302,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":25340720,"timestamp":2087094458345,"id":42,"parentId":19,"tags":{"page":"/api/hub/servers"},"startTime":1780895066705,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":24467415,"timestamp":2087095764993,"id":103,"parentId":59,"tags":{},"startTime":1780895068011,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":25630225,"timestamp":2087094602267,"id":59,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1780895066849,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":24528211,"timestamp":2087095764711,"id":97,"parentId":23,"tags":{},"startTime":1780895068011,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":26358306,"timestamp":2087093985740,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1780895066232,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":24657879,"timestamp":2087095786454,"id":104,"parentId":60,"tags":{},"startTime":1780895068033,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":25841733,"timestamp":2087094602683,"id":60,"parentId":19,"tags":{"page":"/servers"},"startTime":1780895066849,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":24861931,"timestamp":2087095786496,"id":105,"parentId":61,"tags":{},"startTime":1780895068033,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":26045649,"timestamp":2087094602869,"id":61,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1780895066849,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":24949213,"timestamp":2087095764770,"id":98,"parentId":52,"tags":{},"startTime":1780895068011,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":26249130,"timestamp":2087094464955,"id":52,"parentId":19,"tags":{"page":"/login"},"startTime":1780895066711,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":25049641,"timestamp":2087095786513,"id":106,"parentId":63,"tags":{},"startTime":1780895068033,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":26158674,"timestamp":2087094677585,"id":63,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1780895066924,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":25316675,"timestamp":2087095764790,"id":99,"parentId":53,"tags":{},"startTime":1780895068011,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":26616333,"timestamp":2087094465218,"id":53,"parentId":19,"tags":{"page":"/logs"},"startTime":1780895066711,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":25295105,"timestamp":2087095786553,"id":109,"parentId":62,"tags":{},"startTime":1780895068033,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":26478534,"timestamp":2087094603154,"id":62,"parentId":19,"tags":{"page":"/settings"},"startTime":1780895066849,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":25295226,"timestamp":2087095786537,"id":108,"parentId":65,"tags":{},"startTime":1780895068033,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":26403586,"timestamp":2087094678202,"id":65,"parentId":19,"tags":{"page":"/tasks"},"startTime":1780895066924,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":25518163,"timestamp":2087095786524,"id":107,"parentId":64,"tags":{},"startTime":1780895068033,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":26626836,"timestamp":2087094677951,"id":64,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1780895066924,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":25540102,"timestamp":2087095764816,"id":101,"parentId":56,"tags":{},"startTime":1780895068011,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":26747494,"timestamp":2087094557480,"id":56,"parentId":19,"tags":{"page":"/node"},"startTime":1780895066804,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":25574026,"timestamp":2087095764802,"id":100,"parentId":55,"tags":{},"startTime":1780895068011,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":26873356,"timestamp":2087094465557,"id":55,"parentId":19,"tags":{"page":"/messages"},"startTime":1780895066712,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":25295446,"timestamp":2087096181635,"id":110,"parentId":58,"tags":{},"startTime":1780895068428,"traceId":"8ff6404efde47814"}]
|
|
2
|
+
[{"name":"check-page","duration":26901709,"timestamp":2087094575755,"id":58,"parentId":19,"tags":{"page":"/"},"startTime":1780895066822,"traceId":"8ff6404efde47814"},{"name":"is-page-static","duration":26111568,"timestamp":2087095764831,"id":102,"parentId":57,"tags":{},"startTime":1780895068011,"traceId":"8ff6404efde47814"},{"name":"check-page","duration":27318512,"timestamp":2087094557974,"id":57,"parentId":19,"tags":{"page":"/nodes"},"startTime":1780895066804,"traceId":"8ff6404efde47814"},{"name":"static-check","duration":28087700,"timestamp":2087093788840,"id":19,"parentId":1,"tags":{},"startTime":1780895066035,"traceId":"8ff6404efde47814"},{"name":"write-routes-manifest","duration":6254,"timestamp":2087122024981,"id":112,"parentId":1,"tags":{},"startTime":1780895094271,"traceId":"8ff6404efde47814"},{"name":"load-dotenv","duration":93,"timestamp":2087122269669,"id":115,"parentId":114,"tags":{},"startTime":1780895094516,"traceId":"8ff6404efde47814"},{"name":"run-export-path-map","duration":920,"timestamp":2087122380729,"id":116,"parentId":114,"tags":{},"startTime":1780895094627,"traceId":"8ff6404efde47814"},{"name":"next-export","duration":13741150,"timestamp":2087122252845,"id":114,"parentId":1,"tags":{},"startTime":1780895094499,"traceId":"8ff6404efde47814"},{"name":"move-exported-app-not-found-","duration":7962,"timestamp":2087136053162,"id":117,"parentId":113,"tags":{},"startTime":1780895108299,"traceId":"8ff6404efde47814"},{"name":"move-exported-app-global-error-","duration":926,"timestamp":2087136071069,"id":118,"parentId":113,"tags":{},"startTime":1780895108317,"traceId":"8ff6404efde47814"},{"name":"static-generation","duration":14011759,"timestamp":2087122101902,"id":113,"parentId":1,"tags":{},"startTime":1780895094348,"traceId":"8ff6404efde47814"},{"name":"write-routes-manifest","duration":7591,"timestamp":2087136127297,"id":119,"parentId":1,"tags":{},"startTime":1780895108374,"traceId":"8ff6404efde47814"},{"name":"print-tree-view","duration":8947,"timestamp":2087136375618,"id":120,"parentId":1,"tags":{},"startTime":1780895108622,"traceId":"8ff6404efde47814"},{"name":"write-route-bundle-stats","duration":297197,"timestamp":2087136384619,"id":121,"parentId":1,"tags":{},"startTime":1780895108631,"traceId":"8ff6404efde47814"},{"name":"telemetry-flush","duration":196,"timestamp":2087136681869,"id":122,"parentId":1,"tags":{},"startTime":1780895108928,"traceId":"8ff6404efde47814"},{"name":"next-build","duration":669723127,"timestamp":2086466958975,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1780894439205,"traceId":"8ff6404efde47814"}]
|
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-turbopack","duration":
|
|
1
|
+
[{"name":"run-turbopack","duration":326490727,"timestamp":2086470966240,"id":14,"parentId":1,"tags":{},"startTime":1780894443213,"traceId":"8ff6404efde47814"},{"name":"turbopack-build-events","duration":120,"timestamp":2086475648796,"id":15,"parentId":1,"tags":{},"startTime":1780894447895,"traceId":"8ff6404efde47814"},{"name":"run-typescript","duration":289986292,"timestamp":2086798583251,"id":16,"parentId":1,"tags":{},"startTime":1780894770830,"traceId":"8ff6404efde47814"},{"name":"static-check","duration":28087700,"timestamp":2087093788840,"id":19,"parentId":1,"tags":{},"startTime":1780895066035,"traceId":"8ff6404efde47814"},{"name":"static-generation","duration":14011759,"timestamp":2087122101902,"id":113,"parentId":1,"tags":{},"startTime":1780895094348,"traceId":"8ff6404efde47814"},{"name":"telemetry-flush","duration":196,"timestamp":2087136681869,"id":122,"parentId":1,"tags":{},"startTime":1780895108928,"traceId":"8ff6404efde47814"},{"name":"next-build","duration":669723127,"timestamp":2086466958975,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1780894439205,"traceId":"8ff6404efde47814"}]
|
package/app/messages/page.tsx
CHANGED
|
@@ -58,6 +58,14 @@ export default function MessagesPage() {
|
|
|
58
58
|
const [search, setSearch] = useState('');
|
|
59
59
|
const [debug, setDebug] = useState(false);
|
|
60
60
|
const [viewMode, setViewMode] = useState<'timeline' | 'grouped'>('timeline');
|
|
61
|
+
// #209 R33 (Vincent msg 563 WeChat direction): same magnifier-toggle
|
|
62
|
+
// search pattern as R32 on /nodes. Inline ~290 px search input was
|
|
63
|
+
// soaking up scroll real-estate on phones; collapse it behind a
|
|
64
|
+
// top-right magnifier circle in the page header. Default closed;
|
|
65
|
+
// open state autofocuses; an active search value with the box
|
|
66
|
+
// closed shows a cyan dot on the icon as a "filter still applied"
|
|
67
|
+
// hint, mirroring WeChat's red-dot unread marker.
|
|
68
|
+
const [searchOpen, setSearchOpen] = useState(false);
|
|
61
69
|
|
|
62
70
|
const quickFromChips = useMemo(() => {
|
|
63
71
|
const aliases = new Set<string>();
|
|
@@ -107,52 +115,100 @@ export default function MessagesPage() {
|
|
|
107
115
|
<div className="min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono">
|
|
108
116
|
{/* #209 R31 (mobile vertical rhythm — same pattern as R28/R30):
|
|
109
117
|
header row + quick-from chips row both mb-6 → mb-4 sm:mb-6.
|
|
110
|
-
|
|
118
|
+
#209 R33: header restructured to mirror /nodes R32 — title
|
|
119
|
+
cluster left (Messages + count chip + Export MD), magnifier
|
|
120
|
+
circle right. Inline ~290 px search input was moved into the
|
|
121
|
+
collapsible row below. */}
|
|
111
122
|
<div className="flex items-center gap-4 mb-4 sm:mb-6">
|
|
112
|
-
<
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
<div className="flex items-center gap-3 min-w-0 flex-1">
|
|
124
|
+
<h1 className="text-2xl font-bold text-white lg:ml-0 ml-10">Messages</h1>
|
|
125
|
+
{/* Round 89: filter-aware chip. When search/type filter is active
|
|
126
|
+
the visible rows are filtered.length; the total loaded is
|
|
127
|
+
messages.length (capped at 200 by useMessages). Show
|
|
128
|
+
`filtered / total` so users notice how much the filter is
|
|
129
|
+
hiding. Same pattern as r88 /tasks chip. */}
|
|
130
|
+
<span
|
|
131
|
+
className="text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30 tabular-nums shrink-0"
|
|
132
|
+
title={filtered.length < messages.length ? `Showing ${filtered.length} of ${messages.length} messages` : undefined}
|
|
133
|
+
>
|
|
134
|
+
{filtered.length < messages.length ? `${filtered.length} / ${messages.length}` : messages.length}
|
|
135
|
+
</span>
|
|
136
|
+
{filtered.length > 0 && (
|
|
137
|
+
<button
|
|
138
|
+
onClick={() => {
|
|
139
|
+
const md = filtered.map((m: MessageItem) =>
|
|
140
|
+
`**${m.from_alias || '?'}** → ${m.to_alias || '?'} (${m.type || '?'}) — ${m.created_at || ''}\n\n${m.content || '--'}\n\n---`
|
|
141
|
+
).join('\n\n');
|
|
142
|
+
const blob = new Blob([`# Messages Export\n\n${md}`], { type: 'text/markdown' });
|
|
143
|
+
const url = URL.createObjectURL(blob);
|
|
144
|
+
const a = document.createElement('a');
|
|
145
|
+
a.href = url; a.download = `messages-${new Date().toISOString().slice(0,10)}.md`;
|
|
146
|
+
a.click(); URL.revokeObjectURL(url);
|
|
147
|
+
}}
|
|
148
|
+
className="text-xs text-gray-500 hover:text-gray-300 border border-gray-700/50 px-2.5 py-1 rounded-lg transition-colors shrink-0"
|
|
149
|
+
>
|
|
150
|
+
Export MD
|
|
151
|
+
</button>
|
|
152
|
+
)}
|
|
153
|
+
</div>
|
|
154
|
+
{messages.length > 0 && (
|
|
125
155
|
<button
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}}
|
|
136
|
-
className="text-xs text-gray-500 hover:text-gray-300 border border-gray-700/50 px-2.5 py-1 rounded-lg transition-colors"
|
|
156
|
+
type="button"
|
|
157
|
+
onClick={() => setSearchOpen(v => !v)}
|
|
158
|
+
aria-label={searchOpen ? 'Close search' : 'Open search'}
|
|
159
|
+
aria-pressed={searchOpen}
|
|
160
|
+
title={searchOpen ? 'Close search' : 'Search messages'}
|
|
161
|
+
className={`relative shrink-0 inline-flex items-center justify-center rounded-full border w-9 h-9 transition-colors ${
|
|
162
|
+
searchOpen || search
|
|
163
|
+
? 'border-cyan-500/40 bg-cyan-500/10 text-cyan-300'
|
|
164
|
+
: 'border-[#2a2a4a] bg-[#111128] text-gray-400 hover:text-gray-200 hover:border-[#3a3a5a]'
|
|
165
|
+
}`}
|
|
137
166
|
>
|
|
138
|
-
|
|
167
|
+
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
|
168
|
+
<path strokeLinecap="round" strokeLinejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
|
|
169
|
+
</svg>
|
|
170
|
+
{search && !searchOpen && (
|
|
171
|
+
<span aria-hidden className="absolute -top-0.5 -right-0.5 w-2 h-2 rounded-full bg-cyan-400 ring-2 ring-[#0a0a1a]" />
|
|
172
|
+
)}
|
|
139
173
|
</button>
|
|
140
174
|
)}
|
|
141
175
|
</div>
|
|
142
176
|
|
|
177
|
+
{/* R33: collapsible search row — renders when magnifier is open
|
|
178
|
+
OR a search term is active so the user can see/clear it.
|
|
179
|
+
Escape clears + closes; explicit Cancel button does the same. */}
|
|
180
|
+
{messages.length > 0 && (searchOpen || search) && (
|
|
181
|
+
<div className="mb-3 sm:mb-4 flex items-center gap-2">
|
|
182
|
+
<input
|
|
183
|
+
type="text"
|
|
184
|
+
value={search}
|
|
185
|
+
onChange={e => setSearch(e.target.value)}
|
|
186
|
+
onKeyDown={e => { if (e.key === 'Escape') { setSearch(''); setSearchOpen(false); } }}
|
|
187
|
+
placeholder="Search from/to/content or use from:alias…"
|
|
188
|
+
autoFocus={searchOpen}
|
|
189
|
+
className="flex-1 bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-base sm:text-sm text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none"
|
|
190
|
+
/>
|
|
191
|
+
{(search || searchOpen) && (
|
|
192
|
+
<button
|
|
193
|
+
type="button"
|
|
194
|
+
onClick={() => { setSearch(''); setSearchOpen(false); }}
|
|
195
|
+
className="shrink-0 text-xs text-gray-500 hover:text-gray-300 px-2 py-2"
|
|
196
|
+
aria-label="Clear and close search"
|
|
197
|
+
>
|
|
198
|
+
Cancel
|
|
199
|
+
</button>
|
|
200
|
+
)}
|
|
201
|
+
</div>
|
|
202
|
+
)}
|
|
203
|
+
|
|
143
204
|
{/* Round 76: hide search + type filter + view toggle + Debug button
|
|
144
205
|
when there are no messages at all. Same r70-class fix carried
|
|
145
206
|
across /nodes (r74) and /tasks (r75). When at least one message
|
|
146
207
|
exists, the chrome reappears so users can still clear filters. */}
|
|
147
208
|
{messages.length > 0 && (
|
|
148
209
|
<div className="flex flex-wrap gap-3 mb-3">
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
value={search}
|
|
152
|
-
onChange={e => setSearch(e.target.value)}
|
|
153
|
-
placeholder="Search from/to/content or use from:alias"
|
|
154
|
-
className="bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-base sm:text-sm text-white placeholder-gray-600 focus:border-blue-500/50 focus:outline-none w-full sm:w-72"
|
|
155
|
-
/>
|
|
210
|
+
{/* R33: inline search input moved to the top-right magnifier
|
|
211
|
+
toggle above. Type select + view-mode toggle + Debug stay. */}
|
|
156
212
|
<select
|
|
157
213
|
value={filterType}
|
|
158
214
|
onChange={e => setFilterType(e.target.value)}
|
package/package.json
CHANGED
|
File without changes
|
/package/.next/static/{HFTVbWSVTa1wi4DDramY4 → RSm_bZeU9qWHnykS1m6iu}/_clientMiddlewareManifest.js
RENAMED
|
File without changes
|