@ash-ai/dashboard 0.0.7 → 0.1.0
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/app/agents/config/page.tsx +59 -0
- package/app/agents/detail/page.tsx +8 -1
- package/app/agents/evals/page.tsx +14 -403
- package/app/agents/knowledge/page.tsx +14 -157
- package/app/agents/page.tsx +34 -1
- package/app/agents/versions/page.tsx +14 -235
- package/app/sessions/page.tsx +51 -1
- package/out/404/index.html +1 -1
- package/out/404.html +1 -1
- package/out/_next/static/7bfIRYNSIrLnufuHDu6SP/_buildManifest.js +1 -0
- package/out/_next/static/chunks/447.ff2905689aee4ecc.js +1 -0
- package/out/_next/static/chunks/{929-b631fe082fe4e852.js → 929-f69b424a1300c015.js} +1 -1
- package/out/_next/static/chunks/app/agents/config/page-bd4b1aa9c56ac3bf.js +1 -0
- package/out/_next/static/chunks/app/agents/detail/page-7ddf96bb1bf30c84.js +1 -0
- package/out/_next/static/chunks/app/agents/eval-run/page-eb21414673ee3a61.js +1 -0
- package/out/_next/static/chunks/app/agents/eval-runs/page-4737a360beffdd17.js +1 -0
- package/out/_next/static/chunks/app/agents/evals/page-e764fd7f7c4e7dd0.js +1 -0
- package/out/_next/static/chunks/app/agents/knowledge/page-825e40e50aeca7b4.js +1 -0
- package/out/_next/static/chunks/app/agents/page-c70b7f8a4639d430.js +1 -0
- package/out/_next/static/chunks/app/agents/versions/page-16851d0f7e5c442c.js +1 -0
- package/out/_next/static/chunks/app/analytics/page-a1d93f279dc37c76.js +1 -0
- package/out/_next/static/chunks/app/layout-ccc59eb27dd73234.js +1 -0
- package/out/_next/static/chunks/app/logs/page-a47c75fb5c10da47.js +1 -0
- package/out/_next/static/chunks/app/page-8ce5c070587b5731.js +1 -0
- package/out/_next/static/chunks/app/playground/page-0fe012a6d6f00326.js +1 -0
- package/out/_next/static/chunks/app/queue/page-8413b5c0878aa6eb.js +1 -0
- package/out/_next/static/chunks/app/sessions/page-aac6f065bbb5b2ea.js +1 -0
- package/out/_next/static/chunks/app/settings/credentials/page-9ab78fa32e44448a.js +1 -0
- package/out/_next/static/chunks/{webpack-a50a78a04aed446d.js → webpack-2608afc863921e98.js} +1 -1
- package/out/_next/static/css/2c57b4d6ae47f2bd.css +1 -0
- package/out/agents/config/index.html +1 -0
- package/out/agents/config/index.txt +22 -0
- package/out/agents/detail/index.html +1 -1
- package/out/agents/detail/index.txt +6 -6
- package/out/agents/eval-compare/index.html +1 -1
- package/out/agents/eval-compare/index.txt +6 -6
- package/out/agents/eval-run/index.html +1 -1
- package/out/agents/eval-run/index.txt +6 -6
- package/out/agents/eval-runs/index.html +1 -1
- package/out/agents/eval-runs/index.txt +6 -6
- package/out/agents/evals/index.html +1 -1
- package/out/agents/evals/index.txt +6 -6
- package/out/agents/index.html +1 -1
- package/out/agents/index.txt +6 -6
- package/out/agents/knowledge/index.html +1 -1
- package/out/agents/knowledge/index.txt +6 -6
- package/out/agents/versions/index.html +1 -1
- package/out/agents/versions/index.txt +6 -6
- package/out/analytics/index.html +1 -1
- package/out/analytics/index.txt +6 -6
- package/out/index.html +1 -1
- package/out/index.txt +6 -6
- package/out/logs/index.html +1 -1
- package/out/logs/index.txt +6 -6
- package/out/playground/index.html +1 -1
- package/out/playground/index.txt +6 -6
- package/out/queue/index.html +1 -1
- package/out/queue/index.txt +6 -6
- package/out/sessions/index.html +1 -1
- package/out/sessions/index.txt +6 -6
- package/out/settings/api-keys/index.html +1 -1
- package/out/settings/api-keys/index.txt +6 -6
- package/out/settings/credentials/index.html +1 -1
- package/out/settings/credentials/index.txt +6 -6
- package/package.json +4 -4
- package/out/_next/static/chunks/447.6d3368efa2d996b0.js +0 -1
- package/out/_next/static/chunks/app/agents/detail/page-7427483b9c74ad63.js +0 -1
- package/out/_next/static/chunks/app/agents/eval-run/page-a38dac74d1b3787d.js +0 -1
- package/out/_next/static/chunks/app/agents/eval-runs/page-af2fb33c0fce7934.js +0 -1
- package/out/_next/static/chunks/app/agents/evals/page-6bdc4b839a7a8eda.js +0 -1
- package/out/_next/static/chunks/app/agents/knowledge/page-0e02b14bfa2a6d04.js +0 -1
- package/out/_next/static/chunks/app/agents/page-99f179eb7c41ebd4.js +0 -1
- package/out/_next/static/chunks/app/agents/versions/page-c482d9bad8f35df6.js +0 -1
- package/out/_next/static/chunks/app/analytics/page-ca5d8c60e62118ed.js +0 -1
- package/out/_next/static/chunks/app/layout-b06d1caafc026d0c.js +0 -1
- package/out/_next/static/chunks/app/logs/page-1a7df17a605f36d3.js +0 -1
- package/out/_next/static/chunks/app/page-9e02cb0e8897ab5d.js +0 -1
- package/out/_next/static/chunks/app/playground/page-cb17c2ffaeb31b4e.js +0 -1
- package/out/_next/static/chunks/app/queue/page-6013b93817822c75.js +0 -1
- package/out/_next/static/chunks/app/sessions/page-add67d96ab66b690.js +0 -1
- package/out/_next/static/chunks/app/settings/credentials/page-ffe97ffb2f60229d.js +0 -1
- package/out/_next/static/css/ab505eeeff3f7df5.css +0 -1
- package/out/_next/static/sXYgh3eUKXRKt1T_1T3tk/_buildManifest.js +0 -1
- /package/out/_next/static/{sXYgh3eUKXRKt1T_1T3tk → 7bfIRYNSIrLnufuHDu6SP}/_ssgManifest.js +0 -0
package/out/404/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--sXYgh3eUKXRKt1T_1T3tk--><html lang="en" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/dashboard/_next/static/css/ab505eeeff3f7df5.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/dashboard/_next/static/chunks/webpack-a50a78a04aed446d.js"/><script src="/dashboard/_next/static/chunks/b59f762a-cea625f74e98e0aa.js" async=""></script><script src="/dashboard/_next/static/chunks/522-cf174cf1bbbe9557.js" async=""></script><script src="/dashboard/_next/static/chunks/main-app-5bcd4dcc44c4ae09.js" async=""></script><script src="/dashboard/_next/static/chunks/513-c4683887323154aa.js" async=""></script><script src="/dashboard/_next/static/chunks/53-b012ce05184a4754.js" async=""></script><script src="/dashboard/_next/static/chunks/839-186b95b4d095e127.js" async=""></script><script src="/dashboard/_next/static/chunks/90-8e47c31ab931867f.js" async=""></script><script src="/dashboard/_next/static/chunks/929-b631fe082fe4e852.js" async=""></script><script src="/dashboard/_next/static/chunks/app/layout-b06d1caafc026d0c.js" async=""></script><link rel="preload" href="/dashboard/config.js" as="script"/><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Ash Dashboard</title><meta name="description" content="Manage agents, sessions, and monitor your Ash server"/><script>(self.__next_s=self.__next_s||[]).push(["/dashboard/config.js",{}])</script><script src="/dashboard/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="bg-[#0d1117] text-zinc-100 antialiased"><div hidden=""><!--$--><!--/$--></div><div class="flex min-h-screen"><nav class="fixed inset-y-0 left-0 z-50 w-64 flex flex-col border-r border-white/10 bg-[#0d1117]"><div class="flex h-16 items-center gap-3 px-5 border-b border-white/10"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-indigo-500"><span class="text-sm font-bold text-white">A</span></div><div class="min-w-0"><span class="text-white font-bold tracking-tight block">Ash</span><div class="flex items-center gap-1.5 text-white/40 text-xs font-mono"><span class="w-1.5 h-1.5 rounded-full bg-red-400"></span>OFFLINE</div></div></div><div class="flex-1 overflow-auto px-3 py-4 scrollbar-thin"><div class="space-y-0.5"><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-layout-dashboard h-4 w-4"><rect width="7" height="9" x="3" y="3" rx="1"></rect><rect width="7" height="5" x="14" y="3" rx="1"></rect><rect width="7" height="9" x="14" y="12" rx="1"></rect><rect width="7" height="5" x="3" y="16" rx="1"></rect></svg>Dashboard</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/playground/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-code-xml h-4 w-4"><path d="m18 16 4-4-4-4"></path><path d="m6 8-4 4 4 4"></path><path d="m14.5 4-5 16"></path></svg>Playground</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/agents/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bot h-4 w-4"><path d="M12 8V4H8"></path><rect width="16" height="12" x="4" y="8" rx="2"></rect><path d="M2 14h2"></path><path d="M20 14h2"></path><path d="M15 13v2"></path><path d="M9 13v2"></path></svg>Agents</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/sessions/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-activity h-4 w-4"><path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"></path></svg>Sessions</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/logs/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-scroll-text h-4 w-4"><path d="M15 12h-5"></path><path d="M15 8h-5"></path><path d="M19 17V5a2 2 0 0 0-2-2H4"></path><path d="M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3"></path></svg>Logs</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/analytics/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-trending-up h-4 w-4"><polyline points="22 7 13.5 15.5 8.5 10.5 2 17"></polyline><polyline points="16 7 22 7 22 13"></polyline></svg>Analytics</a></div></div><div class="border-t border-white/10 px-3 py-3 space-y-0.5"><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/40 hover:text-white hover:bg-white/5" href="/dashboard/settings/api-keys/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-key h-4 w-4"><path d="m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"></path><path d="m21 2-9.6 9.6"></path><circle cx="7.5" cy="15.5" r="5.5"></circle></svg>API Keys</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/40 hover:text-white hover:bg-white/5" href="/dashboard/settings/credentials/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lock h-4 w-4"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg>Credentials</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/40 hover:text-white hover:bg-white/5" href="/dashboard/queue/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-list-ordered h-4 w-4"><path d="M10 12h11"></path><path d="M10 18h11"></path><path d="M10 6h11"></path><path d="M4 10h2"></path><path d="M4 6h1v4"></path><path d="M6 18H4c0-1 2-2 2-3s-1-1.5-2-1"></path></svg>Queue</a></div></nav><main class="min-w-0 flex-1 pl-64 overflow-y-auto overflow-x-hidden"><div class="mx-auto max-w-[1600px] px-6 pb-6 pt-8 sm:px-8 sm:pb-8 sm:pt-10"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></div></main></div><script src="/dashboard/_next/static/chunks/webpack-a50a78a04aed446d.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[9061,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"839\",\"static/chunks/839-186b95b4d095e127.js\",\"90\",\"static/chunks/90-8e47c31ab931867f.js\",\"929\",\"static/chunks/929-b631fe082fe4e852.js\",\"177\",\"static/chunks/app/layout-b06d1caafc026d0c.js\"],\"\"]\n3:I[6412,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"839\",\"static/chunks/839-186b95b4d095e127.js\",\"90\",\"static/chunks/90-8e47c31ab931867f.js\",\"929\",\"static/chunks/929-b631fe082fe4e852.js\",\"177\",\"static/chunks/app/layout-b06d1caafc026d0c.js\"],\"AshProvider\"]\n4:I[2553,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"839\",\"static/chunks/839-186b95b4d095e127.js\",\"90\",\"static/chunks/90-8e47c31ab931867f.js\",\"929\",\"static/chunks/929-b631fe082fe4e852.js\",\"177\",\"static/chunks/app/layout-b06d1caafc026d0c.js\"],\"DashboardNav\"]\n5:I[2229,[],\"\"]\n6:I[1457,[],\"\"]\n7:I[1464,[],\"OutletBoundary\"]\n9:I[6673,[],\"AsyncMetadataOutlet\"]\nb:I[1464,[],\"ViewportBoundary\"]\nd:I[1464,[],\"MetadataBoundary\"]\ne:\"$Sreact.suspense\"\n10:I[5095,[],\"\"]\n:HL[\"/dashboard/_next/static/css/ab505eeeff3f7df5.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"sXYgh3eUKXRKt1T_1T3tk\",\"p\":\"/dashboard\",\"c\":[\"\",\"_not-found\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/dashboard/_next/static/css/ab505eeeff3f7df5.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"dark\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"$L2\",null,{\"src\":\"/dashboard/config.js\",\"strategy\":\"beforeInteractive\"}]}],[\"$\",\"body\",null,{\"className\":\"bg-[#0d1117] text-zinc-100 antialiased\",\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"div\",null,{\"className\":\"flex min-h-screen\",\"children\":[[\"$\",\"$L4\",null,{}],[\"$\",\"main\",null,{\"className\":\"min-w-0 flex-1 pl-64 overflow-y-auto overflow-x-hidden\",\"children\":[\"$\",\"div\",null,{\"className\":\"mx-auto max-w-[1600px] px-6 pb-6 pt-8 sm:px-8 sm:pb-8 sm:pt-10\",\"children\":[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]}]}]]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L7\",null,{\"children\":[\"$L8\",[\"$\",\"$L9\",null,{\"promise\":\"$@a\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],null],[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$e\",null,{\"fallback\":null,\"children\":\"$Lf\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$10\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n8:null\n"])</script><script>self.__next_f.push([1,"a:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"Ash Dashboard\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Manage agents, sessions, and monitor your Ash server\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"f:\"$a:metadata\"\n"])</script></body></html>
|
|
1
|
+
<!DOCTYPE html><!--7bfIRYNSIrLnufuHDu6SP--><html lang="en" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/dashboard/_next/static/css/2c57b4d6ae47f2bd.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/dashboard/_next/static/chunks/webpack-2608afc863921e98.js"/><script src="/dashboard/_next/static/chunks/b59f762a-cea625f74e98e0aa.js" async=""></script><script src="/dashboard/_next/static/chunks/522-cf174cf1bbbe9557.js" async=""></script><script src="/dashboard/_next/static/chunks/main-app-5bcd4dcc44c4ae09.js" async=""></script><script src="/dashboard/_next/static/chunks/513-c4683887323154aa.js" async=""></script><script src="/dashboard/_next/static/chunks/53-b012ce05184a4754.js" async=""></script><script src="/dashboard/_next/static/chunks/839-186b95b4d095e127.js" async=""></script><script src="/dashboard/_next/static/chunks/90-8e47c31ab931867f.js" async=""></script><script src="/dashboard/_next/static/chunks/929-f69b424a1300c015.js" async=""></script><script src="/dashboard/_next/static/chunks/app/layout-ccc59eb27dd73234.js" async=""></script><link rel="preload" href="/dashboard/config.js" as="script"/><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Ash Dashboard</title><meta name="description" content="Manage agents, sessions, and monitor your Ash server"/><script>(self.__next_s=self.__next_s||[]).push(["/dashboard/config.js",{}])</script><script src="/dashboard/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="bg-[#0d1117] text-zinc-100 antialiased"><div hidden=""><!--$--><!--/$--></div><div class="flex min-h-screen"><nav class="fixed inset-y-0 left-0 z-50 w-64 flex flex-col border-r border-white/10 bg-[#0d1117]"><div class="flex h-16 items-center gap-3 px-5 border-b border-white/10"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-indigo-500"><span class="text-sm font-bold text-white">A</span></div><div class="min-w-0"><span class="text-white font-bold tracking-tight block">Ash</span><div class="flex items-center gap-1.5 text-white/40 text-xs font-mono"><span class="w-1.5 h-1.5 rounded-full bg-red-400"></span>OFFLINE</div></div></div><div class="flex-1 overflow-auto px-3 py-4 scrollbar-thin"><div class="space-y-0.5"><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-layout-dashboard h-4 w-4"><rect width="7" height="9" x="3" y="3" rx="1"></rect><rect width="7" height="5" x="14" y="3" rx="1"></rect><rect width="7" height="9" x="14" y="12" rx="1"></rect><rect width="7" height="5" x="3" y="16" rx="1"></rect></svg>Dashboard</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/playground/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-code-xml h-4 w-4"><path d="m18 16 4-4-4-4"></path><path d="m6 8-4 4 4 4"></path><path d="m14.5 4-5 16"></path></svg>Playground</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/agents/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bot h-4 w-4"><path d="M12 8V4H8"></path><rect width="16" height="12" x="4" y="8" rx="2"></rect><path d="M2 14h2"></path><path d="M20 14h2"></path><path d="M15 13v2"></path><path d="M9 13v2"></path></svg>Agents</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/sessions/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-activity h-4 w-4"><path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"></path></svg>Sessions</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/logs/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-scroll-text h-4 w-4"><path d="M15 12h-5"></path><path d="M15 8h-5"></path><path d="M19 17V5a2 2 0 0 0-2-2H4"></path><path d="M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3"></path></svg>Logs</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/analytics/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-trending-up h-4 w-4"><polyline points="22 7 13.5 15.5 8.5 10.5 2 17"></polyline><polyline points="16 7 22 7 22 13"></polyline></svg>Analytics</a></div></div><div class="border-t border-white/10 px-3 py-3 space-y-0.5"><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/40 hover:text-white hover:bg-white/5" href="/dashboard/settings/api-keys/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-key h-4 w-4"><path d="m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"></path><path d="m21 2-9.6 9.6"></path><circle cx="7.5" cy="15.5" r="5.5"></circle></svg>API Keys</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/40 hover:text-white hover:bg-white/5" href="/dashboard/settings/credentials/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lock h-4 w-4"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg>Credentials</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/40 hover:text-white hover:bg-white/5" href="/dashboard/queue/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-list-ordered h-4 w-4"><path d="M10 12h11"></path><path d="M10 18h11"></path><path d="M10 6h11"></path><path d="M4 10h2"></path><path d="M4 6h1v4"></path><path d="M6 18H4c0-1 2-2 2-3s-1-1.5-2-1"></path></svg>Queue</a></div></nav><main class="min-w-0 flex-1 pl-64 overflow-y-auto overflow-x-hidden"><div class="mx-auto max-w-[1600px] px-6 pb-6 pt-8 sm:px-8 sm:pb-8 sm:pt-10"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></div></main></div><script src="/dashboard/_next/static/chunks/webpack-2608afc863921e98.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[9061,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"839\",\"static/chunks/839-186b95b4d095e127.js\",\"90\",\"static/chunks/90-8e47c31ab931867f.js\",\"929\",\"static/chunks/929-f69b424a1300c015.js\",\"177\",\"static/chunks/app/layout-ccc59eb27dd73234.js\"],\"\"]\n3:I[6412,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"839\",\"static/chunks/839-186b95b4d095e127.js\",\"90\",\"static/chunks/90-8e47c31ab931867f.js\",\"929\",\"static/chunks/929-f69b424a1300c015.js\",\"177\",\"static/chunks/app/layout-ccc59eb27dd73234.js\"],\"AshProvider\"]\n4:I[2553,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"839\",\"static/chunks/839-186b95b4d095e127.js\",\"90\",\"static/chunks/90-8e47c31ab931867f.js\",\"929\",\"static/chunks/929-f69b424a1300c015.js\",\"177\",\"static/chunks/app/layout-ccc59eb27dd73234.js\"],\"DashboardNav\"]\n5:I[2229,[],\"\"]\n6:I[1457,[],\"\"]\n7:I[1464,[],\"OutletBoundary\"]\n9:I[6673,[],\"AsyncMetadataOutlet\"]\nb:I[1464,[],\"ViewportBoundary\"]\nd:I[1464,[],\"MetadataBoundary\"]\ne:\"$Sreact.suspense\"\n10:I[5095,[],\"\"]\n:HL[\"/dashboard/_next/static/css/2c57b4d6ae47f2bd.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"7bfIRYNSIrLnufuHDu6SP\",\"p\":\"/dashboard\",\"c\":[\"\",\"_not-found\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/dashboard/_next/static/css/2c57b4d6ae47f2bd.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"dark\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"$L2\",null,{\"src\":\"/dashboard/config.js\",\"strategy\":\"beforeInteractive\"}]}],[\"$\",\"body\",null,{\"className\":\"bg-[#0d1117] text-zinc-100 antialiased\",\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"div\",null,{\"className\":\"flex min-h-screen\",\"children\":[[\"$\",\"$L4\",null,{}],[\"$\",\"main\",null,{\"className\":\"min-w-0 flex-1 pl-64 overflow-y-auto overflow-x-hidden\",\"children\":[\"$\",\"div\",null,{\"className\":\"mx-auto max-w-[1600px] px-6 pb-6 pt-8 sm:px-8 sm:pb-8 sm:pt-10\",\"children\":[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]}]}]]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L7\",null,{\"children\":[\"$L8\",[\"$\",\"$L9\",null,{\"promise\":\"$@a\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],null],[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$e\",null,{\"fallback\":null,\"children\":\"$Lf\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$10\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n8:null\n"])</script><script>self.__next_f.push([1,"a:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"Ash Dashboard\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Manage agents, sessions, and monitor your Ash server\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"f:\"$a:metadata\"\n"])</script></body></html>
|
package/out/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--sXYgh3eUKXRKt1T_1T3tk--><html lang="en" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/dashboard/_next/static/css/ab505eeeff3f7df5.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/dashboard/_next/static/chunks/webpack-a50a78a04aed446d.js"/><script src="/dashboard/_next/static/chunks/b59f762a-cea625f74e98e0aa.js" async=""></script><script src="/dashboard/_next/static/chunks/522-cf174cf1bbbe9557.js" async=""></script><script src="/dashboard/_next/static/chunks/main-app-5bcd4dcc44c4ae09.js" async=""></script><script src="/dashboard/_next/static/chunks/513-c4683887323154aa.js" async=""></script><script src="/dashboard/_next/static/chunks/53-b012ce05184a4754.js" async=""></script><script src="/dashboard/_next/static/chunks/839-186b95b4d095e127.js" async=""></script><script src="/dashboard/_next/static/chunks/90-8e47c31ab931867f.js" async=""></script><script src="/dashboard/_next/static/chunks/929-b631fe082fe4e852.js" async=""></script><script src="/dashboard/_next/static/chunks/app/layout-b06d1caafc026d0c.js" async=""></script><link rel="preload" href="/dashboard/config.js" as="script"/><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Ash Dashboard</title><meta name="description" content="Manage agents, sessions, and monitor your Ash server"/><script>(self.__next_s=self.__next_s||[]).push(["/dashboard/config.js",{}])</script><script src="/dashboard/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="bg-[#0d1117] text-zinc-100 antialiased"><div hidden=""><!--$--><!--/$--></div><div class="flex min-h-screen"><nav class="fixed inset-y-0 left-0 z-50 w-64 flex flex-col border-r border-white/10 bg-[#0d1117]"><div class="flex h-16 items-center gap-3 px-5 border-b border-white/10"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-indigo-500"><span class="text-sm font-bold text-white">A</span></div><div class="min-w-0"><span class="text-white font-bold tracking-tight block">Ash</span><div class="flex items-center gap-1.5 text-white/40 text-xs font-mono"><span class="w-1.5 h-1.5 rounded-full bg-red-400"></span>OFFLINE</div></div></div><div class="flex-1 overflow-auto px-3 py-4 scrollbar-thin"><div class="space-y-0.5"><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-layout-dashboard h-4 w-4"><rect width="7" height="9" x="3" y="3" rx="1"></rect><rect width="7" height="5" x="14" y="3" rx="1"></rect><rect width="7" height="9" x="14" y="12" rx="1"></rect><rect width="7" height="5" x="3" y="16" rx="1"></rect></svg>Dashboard</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/playground/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-code-xml h-4 w-4"><path d="m18 16 4-4-4-4"></path><path d="m6 8-4 4 4 4"></path><path d="m14.5 4-5 16"></path></svg>Playground</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/agents/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bot h-4 w-4"><path d="M12 8V4H8"></path><rect width="16" height="12" x="4" y="8" rx="2"></rect><path d="M2 14h2"></path><path d="M20 14h2"></path><path d="M15 13v2"></path><path d="M9 13v2"></path></svg>Agents</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/sessions/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-activity h-4 w-4"><path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"></path></svg>Sessions</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/logs/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-scroll-text h-4 w-4"><path d="M15 12h-5"></path><path d="M15 8h-5"></path><path d="M19 17V5a2 2 0 0 0-2-2H4"></path><path d="M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3"></path></svg>Logs</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/analytics/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-trending-up h-4 w-4"><polyline points="22 7 13.5 15.5 8.5 10.5 2 17"></polyline><polyline points="16 7 22 7 22 13"></polyline></svg>Analytics</a></div></div><div class="border-t border-white/10 px-3 py-3 space-y-0.5"><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/40 hover:text-white hover:bg-white/5" href="/dashboard/settings/api-keys/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-key h-4 w-4"><path d="m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"></path><path d="m21 2-9.6 9.6"></path><circle cx="7.5" cy="15.5" r="5.5"></circle></svg>API Keys</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/40 hover:text-white hover:bg-white/5" href="/dashboard/settings/credentials/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lock h-4 w-4"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg>Credentials</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/40 hover:text-white hover:bg-white/5" href="/dashboard/queue/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-list-ordered h-4 w-4"><path d="M10 12h11"></path><path d="M10 18h11"></path><path d="M10 6h11"></path><path d="M4 10h2"></path><path d="M4 6h1v4"></path><path d="M6 18H4c0-1 2-2 2-3s-1-1.5-2-1"></path></svg>Queue</a></div></nav><main class="min-w-0 flex-1 pl-64 overflow-y-auto overflow-x-hidden"><div class="mx-auto max-w-[1600px] px-6 pb-6 pt-8 sm:px-8 sm:pb-8 sm:pt-10"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></div></main></div><script src="/dashboard/_next/static/chunks/webpack-a50a78a04aed446d.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[9061,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"839\",\"static/chunks/839-186b95b4d095e127.js\",\"90\",\"static/chunks/90-8e47c31ab931867f.js\",\"929\",\"static/chunks/929-b631fe082fe4e852.js\",\"177\",\"static/chunks/app/layout-b06d1caafc026d0c.js\"],\"\"]\n3:I[6412,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"839\",\"static/chunks/839-186b95b4d095e127.js\",\"90\",\"static/chunks/90-8e47c31ab931867f.js\",\"929\",\"static/chunks/929-b631fe082fe4e852.js\",\"177\",\"static/chunks/app/layout-b06d1caafc026d0c.js\"],\"AshProvider\"]\n4:I[2553,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"839\",\"static/chunks/839-186b95b4d095e127.js\",\"90\",\"static/chunks/90-8e47c31ab931867f.js\",\"929\",\"static/chunks/929-b631fe082fe4e852.js\",\"177\",\"static/chunks/app/layout-b06d1caafc026d0c.js\"],\"DashboardNav\"]\n5:I[2229,[],\"\"]\n6:I[1457,[],\"\"]\n7:I[1464,[],\"OutletBoundary\"]\n9:I[6673,[],\"AsyncMetadataOutlet\"]\nb:I[1464,[],\"ViewportBoundary\"]\nd:I[1464,[],\"MetadataBoundary\"]\ne:\"$Sreact.suspense\"\n10:I[5095,[],\"\"]\n:HL[\"/dashboard/_next/static/css/ab505eeeff3f7df5.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"sXYgh3eUKXRKt1T_1T3tk\",\"p\":\"/dashboard\",\"c\":[\"\",\"_not-found\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/dashboard/_next/static/css/ab505eeeff3f7df5.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"dark\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"$L2\",null,{\"src\":\"/dashboard/config.js\",\"strategy\":\"beforeInteractive\"}]}],[\"$\",\"body\",null,{\"className\":\"bg-[#0d1117] text-zinc-100 antialiased\",\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"div\",null,{\"className\":\"flex min-h-screen\",\"children\":[[\"$\",\"$L4\",null,{}],[\"$\",\"main\",null,{\"className\":\"min-w-0 flex-1 pl-64 overflow-y-auto overflow-x-hidden\",\"children\":[\"$\",\"div\",null,{\"className\":\"mx-auto max-w-[1600px] px-6 pb-6 pt-8 sm:px-8 sm:pb-8 sm:pt-10\",\"children\":[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]}]}]]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L7\",null,{\"children\":[\"$L8\",[\"$\",\"$L9\",null,{\"promise\":\"$@a\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],null],[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$e\",null,{\"fallback\":null,\"children\":\"$Lf\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$10\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n8:null\n"])</script><script>self.__next_f.push([1,"a:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"Ash Dashboard\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Manage agents, sessions, and monitor your Ash server\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"f:\"$a:metadata\"\n"])</script></body></html>
|
|
1
|
+
<!DOCTYPE html><!--7bfIRYNSIrLnufuHDu6SP--><html lang="en" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/dashboard/_next/static/css/2c57b4d6ae47f2bd.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/dashboard/_next/static/chunks/webpack-2608afc863921e98.js"/><script src="/dashboard/_next/static/chunks/b59f762a-cea625f74e98e0aa.js" async=""></script><script src="/dashboard/_next/static/chunks/522-cf174cf1bbbe9557.js" async=""></script><script src="/dashboard/_next/static/chunks/main-app-5bcd4dcc44c4ae09.js" async=""></script><script src="/dashboard/_next/static/chunks/513-c4683887323154aa.js" async=""></script><script src="/dashboard/_next/static/chunks/53-b012ce05184a4754.js" async=""></script><script src="/dashboard/_next/static/chunks/839-186b95b4d095e127.js" async=""></script><script src="/dashboard/_next/static/chunks/90-8e47c31ab931867f.js" async=""></script><script src="/dashboard/_next/static/chunks/929-f69b424a1300c015.js" async=""></script><script src="/dashboard/_next/static/chunks/app/layout-ccc59eb27dd73234.js" async=""></script><link rel="preload" href="/dashboard/config.js" as="script"/><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Ash Dashboard</title><meta name="description" content="Manage agents, sessions, and monitor your Ash server"/><script>(self.__next_s=self.__next_s||[]).push(["/dashboard/config.js",{}])</script><script src="/dashboard/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="bg-[#0d1117] text-zinc-100 antialiased"><div hidden=""><!--$--><!--/$--></div><div class="flex min-h-screen"><nav class="fixed inset-y-0 left-0 z-50 w-64 flex flex-col border-r border-white/10 bg-[#0d1117]"><div class="flex h-16 items-center gap-3 px-5 border-b border-white/10"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-indigo-500"><span class="text-sm font-bold text-white">A</span></div><div class="min-w-0"><span class="text-white font-bold tracking-tight block">Ash</span><div class="flex items-center gap-1.5 text-white/40 text-xs font-mono"><span class="w-1.5 h-1.5 rounded-full bg-red-400"></span>OFFLINE</div></div></div><div class="flex-1 overflow-auto px-3 py-4 scrollbar-thin"><div class="space-y-0.5"><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-layout-dashboard h-4 w-4"><rect width="7" height="9" x="3" y="3" rx="1"></rect><rect width="7" height="5" x="14" y="3" rx="1"></rect><rect width="7" height="9" x="14" y="12" rx="1"></rect><rect width="7" height="5" x="3" y="16" rx="1"></rect></svg>Dashboard</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/playground/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-code-xml h-4 w-4"><path d="m18 16 4-4-4-4"></path><path d="m6 8-4 4 4 4"></path><path d="m14.5 4-5 16"></path></svg>Playground</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/agents/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bot h-4 w-4"><path d="M12 8V4H8"></path><rect width="16" height="12" x="4" y="8" rx="2"></rect><path d="M2 14h2"></path><path d="M20 14h2"></path><path d="M15 13v2"></path><path d="M9 13v2"></path></svg>Agents</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/sessions/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-activity h-4 w-4"><path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"></path></svg>Sessions</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/logs/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-scroll-text h-4 w-4"><path d="M15 12h-5"></path><path d="M15 8h-5"></path><path d="M19 17V5a2 2 0 0 0-2-2H4"></path><path d="M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3"></path></svg>Logs</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/60 hover:text-white hover:bg-white/5 border border-transparent" href="/dashboard/analytics/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-trending-up h-4 w-4"><polyline points="22 7 13.5 15.5 8.5 10.5 2 17"></polyline><polyline points="16 7 22 7 22 13"></polyline></svg>Analytics</a></div></div><div class="border-t border-white/10 px-3 py-3 space-y-0.5"><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/40 hover:text-white hover:bg-white/5" href="/dashboard/settings/api-keys/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-key h-4 w-4"><path d="m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"></path><path d="m21 2-9.6 9.6"></path><circle cx="7.5" cy="15.5" r="5.5"></circle></svg>API Keys</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/40 hover:text-white hover:bg-white/5" href="/dashboard/settings/credentials/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lock h-4 w-4"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg>Credentials</a><a class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 text-white/40 hover:text-white hover:bg-white/5" href="/dashboard/queue/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-list-ordered h-4 w-4"><path d="M10 12h11"></path><path d="M10 18h11"></path><path d="M10 6h11"></path><path d="M4 10h2"></path><path d="M4 6h1v4"></path><path d="M6 18H4c0-1 2-2 2-3s-1-1.5-2-1"></path></svg>Queue</a></div></nav><main class="min-w-0 flex-1 pl-64 overflow-y-auto overflow-x-hidden"><div class="mx-auto max-w-[1600px] px-6 pb-6 pt-8 sm:px-8 sm:pb-8 sm:pt-10"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></div></main></div><script src="/dashboard/_next/static/chunks/webpack-2608afc863921e98.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[9061,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"839\",\"static/chunks/839-186b95b4d095e127.js\",\"90\",\"static/chunks/90-8e47c31ab931867f.js\",\"929\",\"static/chunks/929-f69b424a1300c015.js\",\"177\",\"static/chunks/app/layout-ccc59eb27dd73234.js\"],\"\"]\n3:I[6412,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"839\",\"static/chunks/839-186b95b4d095e127.js\",\"90\",\"static/chunks/90-8e47c31ab931867f.js\",\"929\",\"static/chunks/929-f69b424a1300c015.js\",\"177\",\"static/chunks/app/layout-ccc59eb27dd73234.js\"],\"AshProvider\"]\n4:I[2553,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"839\",\"static/chunks/839-186b95b4d095e127.js\",\"90\",\"static/chunks/90-8e47c31ab931867f.js\",\"929\",\"static/chunks/929-f69b424a1300c015.js\",\"177\",\"static/chunks/app/layout-ccc59eb27dd73234.js\"],\"DashboardNav\"]\n5:I[2229,[],\"\"]\n6:I[1457,[],\"\"]\n7:I[1464,[],\"OutletBoundary\"]\n9:I[6673,[],\"AsyncMetadataOutlet\"]\nb:I[1464,[],\"ViewportBoundary\"]\nd:I[1464,[],\"MetadataBoundary\"]\ne:\"$Sreact.suspense\"\n10:I[5095,[],\"\"]\n:HL[\"/dashboard/_next/static/css/2c57b4d6ae47f2bd.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"7bfIRYNSIrLnufuHDu6SP\",\"p\":\"/dashboard\",\"c\":[\"\",\"_not-found\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/dashboard/_next/static/css/2c57b4d6ae47f2bd.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"dark\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"$L2\",null,{\"src\":\"/dashboard/config.js\",\"strategy\":\"beforeInteractive\"}]}],[\"$\",\"body\",null,{\"className\":\"bg-[#0d1117] text-zinc-100 antialiased\",\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"div\",null,{\"className\":\"flex min-h-screen\",\"children\":[[\"$\",\"$L4\",null,{}],[\"$\",\"main\",null,{\"className\":\"min-w-0 flex-1 pl-64 overflow-y-auto overflow-x-hidden\",\"children\":[\"$\",\"div\",null,{\"className\":\"mx-auto max-w-[1600px] px-6 pb-6 pt-8 sm:px-8 sm:pb-8 sm:pt-10\",\"children\":[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]}]}]]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L7\",null,{\"children\":[\"$L8\",[\"$\",\"$L9\",null,{\"promise\":\"$@a\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],null],[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$e\",null,{\"fallback\":null,\"children\":\"$Lf\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$10\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n8:null\n"])</script><script>self.__next_f.push([1,"a:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"Ash Dashboard\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Manage agents, sessions, and monitor your Ash server\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"f:\"$a:metadata\"\n"])</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
self.__BUILD_MANIFEST=function(e,r,t){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:18,errorRate:1e-4,numBits:346,numHashes:14,bitArray:[1,0,1,0,e,e,e,e,r,e,r,e,e,r,r,r,r,r,e,e,e,e,r,e,r,e,e,e,e,e,r,r,e,e,r,e,r,r,e,e,r,e,e,r,e,r,r,e,r,r,e,r,r,e,e,r,r,r,e,e,r,r,e,e,r,e,r,e,e,e,r,r,e,e,e,r,r,r,e,e,e,r,r,e,r,e,e,r,r,e,e,e,r,r,e,r,r,e,e,r,e,r,e,e,e,r,r,e,e,r,r,e,e,e,r,r,e,e,e,e,r,r,e,r,e,e,r,e,r,e,e,r,e,r,r,e,e,r,e,e,e,r,e,e,e,r,e,e,e,r,e,r,r,r,r,e,r,r,r,r,e,r,r,r,e,e,e,r,e,r,e,r,r,r,e,r,e,e,e,e,r,e,e,r,e,e,e,r,e,e,r,r,r,r,e,e,r,r,e,e,e,e,r,r,r,r,r,e,r,e,r,r,r,e,e,e,r,e,r,r,r,e,r,e,r,r,e,r,e,r,r,e,r,r,r,e,e,r,e,e,e,r,e,e,e,e,r,e,e,r,e,r,e,e,r,r,r,r,r,r,e,e,e,r,r,r,r,r,e,e,e,e,e,e,e,r,e,r,e,r,e,r,e,r,r,e,e,e,r,e,e,r,r,r,e,e,r,r,e,r,r,e,r,e,e,r,r,e,r,e,r,e,e,e,e,e,r,e,e,r,r,r,r,e,r,r,r,e,r,e,e,r,e,e,e,r,r,r,e,r,e,r,r,e,e,e]},__routerFilterDynamic:{numItems:r,errorRate:1e-4,numBits:r,numHashes:null,bitArray:[]},"/_error":["static/chunks/pages/_error-310ed5880fd5d5e6.js"],sortedPages:["/_app","/_error"]}}(1,0,1e-4),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[447],{6447:(e,t,s)=>{s.r(t),s.d(t,{AgentConfigEditor:()=>eF,AgentEvalRunner:()=>eD,AgentKnowledgeBase:()=>eB,AgentVersionManager:()=>eA,BottomPanels:()=>eb,Chat:()=>eu,ChatInput:()=>em,ChatMessage:()=>ex,ChatMessages:()=>eh,FileBrowser:()=>ev,FileTree:()=>ej,Playground:()=>eL,PlaygroundHeader:()=>eo,PlaygroundProvider:()=>y,SessionHistory:()=>ep,StatusIndicator:()=>ea,Terminal:()=>eg,ThinkingBlock:()=>ec,ToolCallBlock:()=>ed,buildFileTree:()=>d,cn:()=>a,formatBytes:()=>o,formatTime:()=>c,getFileLanguage:()=>u,isImageFile:()=>m,parseContentBlocks:()=>function e(t){let s=null;if("string"==typeof t)try{let n=JSON.parse(t);if(Array.isArray(n))s=n;else if(n&&"object"==typeof n)return e(x(n))}catch(e){return{text:t,toolCalls:[],thinking:[]}}else if(Array.isArray(t))s=t;else if(t&&"object"==typeof t)return e(x(t));if(!s)return{text:"string"==typeof t?t:"",toolCalls:[],thinking:[]};let n="",l=[],i=[];for(let e of s){let t=e;if("text"===t.type&&"string"==typeof t.text)n+=(n?"\n":"")+t.text;else if("tool_use"===t.type)l.push({id:t.id||"tool-".concat(l.length),name:t.name||"unknown",input:t.input,state:"completed"});else if("tool_result"===t.type){let e=l.find(e=>e.id===t.tool_use_id);if(e){var r;e.output=t.content,e.isError=null!=(r=t.is_error)&&r,e.state=t.is_error?"error":"completed"}}else if("thinking"===t.type){let e=t.thinking||t.text||"";e&&i.push(e)}}return{text:n,toolCalls:l,thinking:i}},useAgents:()=>w,useFileBrowser:()=>eN,useFileUpload:()=>j,useHealthCheck:()=>f,usePlaygroundChat:()=>p,usePlaygroundContext:()=>b,useSessions:()=>g,useTerminal:()=>ey});var n=s(6862),l=s(3690),i=s(4166),r=s(534);function a(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,l.QP)((0,n.$)(t))}function o(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(1))+" "+["B","KB","MB","GB"][t]}function c(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit"})}function d(e){let t=[];for(let s of e){let e=s.path.split("/"),n=t;for(let t=0;t<e.length;t++){let l=e[t],i=t===e.length-1,r=e.slice(0,t+1).join("/"),a=n.find(e=>e.name===l&&!i===e.isDir);a||(a={name:l,path:r,isDir:!i,size:i?s.size:void 0,modifiedAt:i?s.modifiedAt:void 0,children:[]},n.push(a)),n=a.children}}return!function e(t){for(let s of(t.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name)),t))s.children.length>0&&e(s.children)}(t),t}function x(e){if(e.message&&"object"==typeof e.message){let t=e.message;if(Array.isArray(t.content))return t.content}return Array.isArray(e.content)||"string"==typeof e.content?e.content:"string"==typeof e.result?e.result:""}var h=new Set(["png","jpg","jpeg","gif","svg","webp","ico"]);function m(e){var t;let s=null==(t=e.split(".").pop())?void 0:t.toLowerCase();return h.has(s||"")}function u(e){var t;return({ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",py:"python",rs:"rust",go:"go",rb:"ruby",json:"json",yaml:"yaml",yml:"yaml",toml:"toml",md:"markdown",sh:"bash",bash:"bash",css:"css",html:"html",sql:"sql",xml:"xml"})[(null==(t=e.split(".").pop())?void 0:t.toLowerCase())||""]||"text"}function p(e){let{client:t,agentSlug:s,initialSessionId:n,onSessionStart:l,onError:r}=e,[a,o]=(0,i.useState)([]),[c,d]=(0,i.useState)(""),[x,h]=(0,i.useState)(!1),[m,u]=(0,i.useState)(!1),[p,w]=(0,i.useState)(null),[g,f]=(0,i.useState)(null!=n?n:null),[j,v]=(0,i.useState)([]),b=(0,i.useRef)(!1),y=(0,i.useCallback)(()=>{f(null),o([]),v([]),w(null)},[]),N=(0,i.useCallback)(async e=>{f(e),u(!0),w(null);try{let r=await t.listMessages(e),a=[];for(let e=0;e<r.length;e++){var s,n,l,i;let t,o=r[e],c="",d=[];try{t=JSON.parse(o.content)}catch(e){t=o.content}let x=t;if("assistant"===x.type&&Array.isArray(null==(s=x.message)?void 0:s.content))for(let e of x.message.content)"text"===e.type&&e.text?c+=(c?"\n":"")+e.text:"tool_use"===e.type&&d.push({id:e.id||"tool-".concat(d.length),name:e.name||"unknown",input:e.input,state:"completed"});if("user"===x.type&&x.tool_use_result){let e=x.tool_use_result,t=d.find(t=>t.id===e.tool_use_id)||(a.length>0?null==(n=a[a.length-1].toolCalls)?void 0:n.find(t=>t.id===e.tool_use_id):void 0);t&&(t.output=null!=(l=e.stdout)?l:e.content,t.isError=null!=(i=e.is_error)&&i,t.state=e.is_error?"error":"completed");continue}if("user"===x.type&&!x.tool_use_result){let t=Array.isArray(x.content)?x.content.filter(e=>"text"===e.type).map(e=>e.text).join("\n"):"string"==typeof x.content?x.content:"";t&&a.push({id:o.id||"msg-".concat(e),role:"user",content:t,timestamp:o.createdAt});continue}"result"===x.type&&"string"==typeof x.result&&(c=x.result),(c||d.length>0)&&a.push({id:o.id||"msg-".concat(e),role:"user"===o.role?"user":"assistant",content:c,toolCalls:d.length>0?d:void 0,timestamp:o.createdAt})}o(a)}catch(e){o([{id:"err",role:"system",content:"Failed to load session messages."}])}finally{u(!1)}},[t]),k=(0,i.useCallback)(async()=>{let e=c.trim(),n=j.filter(e=>!e.uploading);if(!e&&0===n.length||!s||b.current)return;let i=e;if(n.length>0){let e=n.map(e=>"[Attached file: ".concat(e.filename,"](").concat(e.url,")")).join("\n");i=i?"".concat(i,"\n\n").concat(e):e}let a=g;if(!a){h(!0),b.current=!0,w(null);try{a=(await t.createSession(s)).id,f(a),null==l||l(a)}catch(t){let e=t instanceof Error?t.message:"Failed to create session";w(e),null==r||r(e),h(!1),b.current=!1;return}}d(""),v([]);let x={id:"user-".concat(Date.now()),role:"user",content:i,timestamp:new Date().toISOString()};o(e=>[...e,x]),h(!0),b.current=!0;let m="assistant-".concat(Date.now());o(e=>[...e,{id:m,role:"assistant",content:"",isStreaming:!0}]);try{let e="",s=[];for await(let n of t.sendMessageStream(a,i,{includePartialMessages:!0})){var u,p,y;if("text_delta"===n.type){let t=n.data.delta||"";e+=t,o(t=>t.map(t=>t.id===m?{...t,content:e,toolCalls:[...s],isStreaming:!0}:t))}else if("tool_use"===n.type){let t=n.data,l={id:t.id||"tool-".concat(Date.now(),"-").concat(s.length),name:t.name||"unknown",input:t.input,state:"running"};s.push(l),o(t=>t.map(t=>t.id===m?{...t,content:e,toolCalls:[...s],isStreaming:!0}:t))}else if("tool_result"===n.type){let t=n.data,l=s.findIndex(e=>e.id===t.tool_use_id);-1!==l?s[l]={...s[l],output:t.content,isError:null!=(u=t.is_error)&&u,state:t.is_error?"error":"completed"}:s.push({id:t.tool_use_id||"result-".concat(Date.now()),name:"tool_result",input:void 0,output:t.content,isError:null!=(p=t.is_error)&&p,state:t.is_error?"error":"completed"}),o(t=>t.map(t=>t.id===m?{...t,content:e,toolCalls:[...s],isStreaming:!0}:t))}else if("turn_complete"===n.type||"done"===n.type){let t=n.data;for(let n of(!e&&t.result&&(e=t.result),s))("running"===n.state||"pending"===n.state)&&(n.state="completed");o(t=>t.map(t=>t.id===m?{...t,content:e||"(no response)",toolCalls:[...s],isStreaming:!1,timestamp:new Date().toISOString()}:t))}else if("message"===n.type){let t=n.data;if("assistant"===t.type&&Array.isArray(null==(y=t.message)?void 0:y.content)){let n="";for(let e of t.message.content)"text"===e.type&&e.text&&(n+=(n?"\n":"")+e.text);n&&(e=n,o(t=>t.map(t=>t.id===m?{...t,content:e,toolCalls:[...s],isStreaming:!0}:t)))}}else if("error"===n.type){let e=n.data.error||"Unknown error";o(t=>t.map(t=>t.id===m?{...t,role:"system",content:"Error: ".concat(e),isStreaming:!1}:t))}}if(e||s.length>0){for(let e of s)("running"===e.state||"pending"===e.state)&&(e.state="completed");o(t=>t.map(t=>t.id===m&&t.isStreaming?{...t,content:e||"(no response)",toolCalls:s.length>0?[...s]:void 0,isStreaming:!1,timestamp:new Date().toISOString()}:t))}}catch(t){let e=t instanceof Error?t.message:"Failed to send";o(t=>t.map(t=>t.id===m?{...t,role:"system",content:"Error: ".concat(e),isStreaming:!1}:t))}finally{h(!1),b.current=!1}},[c,j,g,s,t,l,r]);return{messages:a,input:c,setInput:d,sending:x,loading:m,error:p,sessionId:g,attachedFiles:j,setAttachedFiles:v,send:k,loadSession:N,startNewChat:y,setMessages:o}}function w(e){let{client:t}=e,[s,n]=(0,i.useState)([]),[l,r]=(0,i.useState)(!0),[a,o]=(0,i.useState)(null),c=async()=>{r(!0),o(null);try{let e=await t.listAgents();n(e)}catch(e){o(e instanceof Error?e.message:"Failed to fetch agents")}finally{r(!1)}};return(0,i.useEffect)(()=>{c()},[]),{agents:s,loading:l,error:a,refresh:c}}function g(e){let{client:t,agent:s,limit:n=20,enabled:l=!0}=e,[r,a]=(0,i.useState)([]),[o,c]=(0,i.useState)(!1),[d,x]=(0,i.useState)(null),h=(0,i.useCallback)(async()=>{c(!0),x(null);try{let e=await t.listSessions({agent:s,limit:n});a(e)}catch(e){x(e instanceof Error?e.message:"Failed to fetch sessions")}finally{c(!1)}},[t,s,n]);return(0,i.useEffect)(()=>{l&&h()},[l,h]),{sessions:r,loading:o,error:d,refresh:h}}function f(e){let{client:t}=e,[s,n]=(0,i.useState)(null),l=async()=>{try{await t.health(),n(!0)}catch(e){n(!1)}};return(0,i.useEffect)(()=>{l()},[]),{connected:s,refresh:l}}function j(e){let{client:t,onFilesChange:s,onError:n}=e;return{handleFileSelect:(0,i.useCallback)(async e=>{let l=e.target.files;if(l&&0!==l.length){for(let e of Array.from(l)){let l="uploading-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2));s(t=>[...t,{id:l,filename:e.name,url:"",uploading:!0}]);try{let n=await new Promise((t,s)=>{let n=new FileReader;n.onload=()=>{let e=n.result;t(e.split(",")[1])},n.onerror=()=>s(Error("Failed to read file")),n.readAsDataURL(e)}),i=await t.uploadFile({filename:e.name,content:n,mimeType:e.type||void 0,ttl:"24h"}),r=await t.getFileUrl(i.id);s(t=>t.map(t=>t.id===l?{id:i.id,filename:e.name,url:r,uploading:!1}:t))}catch(t){s(e=>e.filter(e=>e.id!==l)),null==n||n("Failed to upload ".concat(e.name))}}e.target.value=""}},[t,s,n]),removeFile:(0,i.useCallback)(e=>{s(t=>t.filter(t=>t.id!==e))},[s])}}var v=(0,i.createContext)(null);function b(){let e=(0,i.useContext)(v);if(!e)throw Error("usePlaygroundContext must be used within <PlaygroundProvider>");return e}function y(e){var t,s;let{client:n,defaultAgent:l,children:a}=e,[o,c]=(0,i.useState)(l||""),[d,x]=(0,i.useState)(!1),[h,m]=(0,i.useState)(!1),[u,b]=(0,i.useState)(!1),y=w({client:n}),N=f({client:n}),k=o||(null==(t=y.agents[0])?void 0:t.slug)||(null==(s=y.agents[0])?void 0:s.name)||"",C=p({client:n,agentSlug:k}),S=g({client:n,agent:k,enabled:d}),L=j({client:n,onFilesChange:C.setAttachedFiles,onError:e=>{C.setMessages(t=>[...t,{id:"err-".concat(Date.now()),role:"system",content:e}])}}),M=(0,i.useCallback)(e=>{c(e),C.startNewChat()},[C]);return(0,r.jsx)(v.Provider,{value:{client:n,chat:C,agents:y,sessions:S,health:N,fileUpload:L,selectedAgent:k,setSelectedAgent:M,showHistory:d,setShowHistory:x,terminalOpen:h,setTerminalOpen:m,filesOpen:u,setFilesOpen:b},children:a})}function N(e,t){return s=>{var n;return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:null!=(n=null==t?void 0:t.viewBox)?n:"0 0 24 24",fill:(null==t?void 0:t.fill)?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...s,children:(0,r.jsx)("path",{d:e})})}}var k=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"}),(0,r.jsx)("path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"}),(0,r.jsx)("path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4"}),(0,r.jsx)("path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375"}),(0,r.jsx)("path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5"}),(0,r.jsx)("path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396"}),(0,r.jsx)("path",{d:"M19.938 10.5a4 4 0 0 1 .585.396"}),(0,r.jsx)("path",{d:"M6 18a4 4 0 0 1-1.967-.516"}),(0,r.jsx)("path",{d:"M19.967 17.484A4 4 0 0 1 18 18"})]}),C=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M12 8V4H8"}),(0,r.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,r.jsx)("path",{d:"M2 14h2"}),(0,r.jsx)("path",{d:"M20 14h2"}),(0,r.jsx)("path",{d:"M15 13v2"}),(0,r.jsx)("path",{d:"M9 13v2"})]}),S=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}),(0,r.jsx)("circle",{cx:"12",cy:"7",r:"4"})]}),L=N("m22 2-7 20-4-9-9-4Z M22 2 11 13"),M=e=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,r.jsx)("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),F=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("polyline",{points:"4 17 10 11 4 5"}),(0,r.jsx)("line",{x1:"12",x2:"20",y1:"19",y2:"19"})]}),A=e=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,r.jsx)("path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"})}),E=e=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,r.jsx)("path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"})}),B=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),(0,r.jsx)("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),(0,r.jsx)("path",{d:"M10 9H8"}),(0,r.jsx)("path",{d:"M16 13H8"}),(0,r.jsx)("path",{d:"M16 17H8"})]}),D=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),(0,r.jsx)("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),(0,r.jsx)("path",{d:"m10 13-2 2 2 2"}),(0,r.jsx)("path",{d:"m14 17 2-2-2-2"})]}),_=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),(0,r.jsx)("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),(0,r.jsx)("path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1"}),(0,r.jsx)("path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1"})]}),R=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}),(0,r.jsx)("circle",{cx:"9",cy:"9",r:"2"}),(0,r.jsx)("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"})]}),W=e=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,r.jsx)("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),H=N("m6 9 6 6 6-6"),I=N("m18 15-6-6-6 6"),T=N("m9 18 6-6-6-6"),P=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M5 12h14"}),(0,r.jsx)("path",{d:"M12 5v14"})]}),V=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M18 6 6 18"}),(0,r.jsx)("path",{d:"m6 6 12 12"})]}),z=N("m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"),O=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("polyline",{points:"12 6 12 12 16 14"})]}),U=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M12 20h.01"}),(0,r.jsx)("path",{d:"M2 8.82a15 15 0 0 1 20 0"}),(0,r.jsx)("path",{d:"M5 12.859a10 10 0 0 1 14 0"}),(0,r.jsx)("path",{d:"M8.5 16.429a5 5 0 0 1 7 0"})]}),Z=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M12 20h.01"}),(0,r.jsx)("path",{d:"M8.5 16.429a5 5 0 0 1 7 0"}),(0,r.jsx)("path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69"}),(0,r.jsx)("path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523"}),(0,r.jsx)("path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643"}),(0,r.jsx)("path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764"}),(0,r.jsx)("path",{d:"m2 2 20 20"})]}),q=e=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,r.jsx)("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),J=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("path",{d:"m9 12 2 2 4-4"})]}),K=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("path",{d:"m15 9-6 6"}),(0,r.jsx)("path",{d:"m9 9 6 6"})]}),Q=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,r.jsx)("path",{d:"m21 21-4.3-4.3"})]}),G=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M3 6h18"}),(0,r.jsx)("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),(0,r.jsx)("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}),(0,r.jsx)("line",{x1:"10",x2:"10",y1:"11",y2:"17"}),(0,r.jsx)("line",{x1:"14",x2:"14",y1:"11",y2:"17"})]}),Y=N("M12 5v14 m7-7-7 7-7-7"),$=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,r.jsx)("polyline",{points:"7 10 12 15 17 10"}),(0,r.jsx)("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]}),X=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),(0,r.jsx)("path",{d:"M21 3v5h-5"}),(0,r.jsx)("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),(0,r.jsx)("path",{d:"M8 16H3v5"})]}),ee=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"}),(0,r.jsx)("path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"}),(0,r.jsx)("path",{d:"M7 3v4a1 1 0 0 0 1 1h7"})]}),et=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("line",{x1:"6",x2:"6",y1:"3",y2:"15"}),(0,r.jsx)("circle",{cx:"18",cy:"6",r:"3"}),(0,r.jsx)("circle",{cx:"6",cy:"18",r:"3"}),(0,r.jsx)("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),es=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2"}),(0,r.jsx)("path",{d:"M8.5 2h7"}),(0,r.jsx)("path",{d:"M7 16.5h10"})]}),en=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M12 7v14"}),(0,r.jsx)("path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"})]}),el=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,r.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,r.jsx)("line",{x1:"12",x2:"12",y1:"3",y2:"15"})]}),ei=e=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,r.jsx)("polygon",{points:"6 3 20 12 6 21 6 3"})}),er=e=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:(0,r.jsx)("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"})});function ea(e){let{connected:t,className:s}=e;return null===t?null:(0,r.jsx)("div",{className:a("flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[10px] font-medium border",t?"bg-green-500/10 text-green-400 border-green-500/20":"bg-red-500/10 text-red-400 border-red-500/20",s),children:t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(U,{className:"h-3 w-3"})," Runtime connected"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Z,{className:"h-3 w-3"})," Runtime disconnected"]})})}function eo(e){let{agents:t,selectedAgent:s,onAgentChange:n,runtimeConnected:l,showHistory:i,onToggleHistory:o,sessionId:c,onNewChat:d,className:x}=e;return(0,r.jsxs)("div",{className:a("shrink-0 flex items-center justify-between border-b border-white/10 pb-3 mb-4",x),children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-xs font-medium text-white/40 uppercase tracking-wider",children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-accent animate-pulse"}),"PLAYGROUND"]}),(0,r.jsxs)("select",{value:s,onChange:e=>n(e.target.value),className:"rounded-lg border border-white/10 bg-white/5 px-3 py-1.5 text-sm text-white focus:border-accent/50 focus:outline-none",children:[(0,r.jsx)("option",{value:"",disabled:!0,children:"Select agent..."}),t.map(e=>(0,r.jsx)("option",{value:e.slug||e.name,children:e.name},e.id))]}),(0,r.jsx)(ea,{connected:l})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("button",{onClick:o,className:a("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-all",i?"bg-accent/10 text-accent border-accent/30":"bg-white/5 text-white/50 border-white/10 hover:bg-white/10"),children:[(0,r.jsx)(O,{className:"h-3 w-3"}),"History"]}),s&&(0,r.jsxs)("button",{onClick:d,className:a("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-all",c?"bg-white/5 text-white/50 border-white/10 hover:bg-white/10":"bg-accent/10 text-accent border-accent/30"),children:[(0,r.jsx)(P,{className:"h-3 w-3"}),"New Chat"]})]})]})}function ec(e){let{thinking:t}=e,[s,n]=(0,i.useState)(!1),l=t.join("\n\n");return(0,r.jsxs)("div",{className:"my-2 rounded-lg border border-amber-500/20 bg-amber-500/[0.03] overflow-hidden",children:[(0,r.jsxs)("button",{onClick:()=>n(!s),className:"flex w-full items-center gap-2 px-3 py-2 text-left hover:bg-amber-500/5 transition-colors",children:[(0,r.jsx)(k,{className:"h-3.5 w-3.5 shrink-0 text-amber-500/60"}),(0,r.jsx)("span",{className:"text-xs font-medium text-amber-400/70",children:"Thinking"}),(0,r.jsx)("span",{className:"ml-auto flex items-center gap-1.5",children:s?(0,r.jsx)(H,{className:"h-3 w-3 text-white/30"}):(0,r.jsx)(T,{className:"h-3 w-3 text-white/30"})})]}),s&&(0,r.jsx)("div",{className:"border-t border-amber-500/10 px-3 py-2",children:(0,r.jsx)("pre",{className:"whitespace-pre-wrap text-xs text-white/50 leading-relaxed max-h-96 overflow-y-auto",children:l})})]})}function ed(e){let{tool:t}=e,[s,n]=(0,i.useState)(!1),l="running"===t.state||"pending"===t.state,o="error"===t.state,c="completed"===t.state;return(0,r.jsxs)("div",{className:"my-2 rounded-lg border border-white/10 bg-white/[0.03] overflow-hidden",children:[(0,r.jsxs)("button",{onClick:()=>n(!s),className:"flex w-full items-center gap-2 px-3 py-2 text-left hover:bg-white/5 transition-colors",children:[(0,r.jsx)(q,{className:"h-3.5 w-3.5 shrink-0 text-white/40"}),(0,r.jsx)("span",{className:"text-xs font-medium text-white/70 truncate",children:t.name}),(0,r.jsxs)("span",{className:"ml-auto flex items-center gap-1.5",children:[l&&(0,r.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-blue-500/10 border border-blue-500/20 px-2 py-0.5 text-[10px] font-medium text-blue-400",children:[(0,r.jsx)(W,{className:"h-3 w-3 animate-spin"}),"Running"]}),c&&(0,r.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-green-500/10 border border-green-500/20 px-2 py-0.5 text-[10px] font-medium text-green-400",children:[(0,r.jsx)(J,{className:"h-3 w-3"}),"Done"]}),o&&(0,r.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-red-500/10 border border-red-500/20 px-2 py-0.5 text-[10px] font-medium text-red-400",children:[(0,r.jsx)(K,{className:"h-3 w-3"}),"Error"]}),s?(0,r.jsx)(H,{className:"h-3 w-3 text-white/30"}):(0,r.jsx)(T,{className:"h-3 w-3 text-white/30"})]})]}),s&&(0,r.jsxs)("div",{className:"border-t border-white/10 px-3 py-2 space-y-2",children:[null!=t.input&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-[10px] font-medium text-white/30 uppercase tracking-wider mb-1",children:"Input"}),(0,r.jsx)("pre",{className:"rounded-md bg-black/30 px-3 py-2 text-[11px] text-white/60 overflow-x-auto max-h-48 scrollbar-thin",children:"string"==typeof t.input?t.input:JSON.stringify(t.input,null,2)})]}),null!=t.output&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-[10px] font-medium text-white/30 uppercase tracking-wider mb-1",children:o?"Error":"Output"}),(0,r.jsx)("pre",{className:a("rounded-md px-3 py-2 text-[11px] overflow-x-auto max-h-64 scrollbar-thin",o?"bg-red-500/10 text-red-400":"bg-black/30 text-white/60"),children:"string"==typeof t.output?t.output:JSON.stringify(t.output,null,2)})]})]})]})}function ex(e){var t;let{message:s}=e,n="user"===s.role;return"system"===s.role?(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)("span",{className:"max-w-lg rounded-xl bg-red-500/10 border border-red-500/20 px-4 py-2 text-xs text-red-400",children:s.content})}):(0,r.jsxs)("div",{className:a("flex gap-3",n?"flex-row-reverse":"flex-row"),children:[(0,r.jsx)("div",{className:a("flex h-8 w-8 shrink-0 items-center justify-center rounded-full",n?"bg-accent/20":"bg-white/10"),children:n?(0,r.jsx)(S,{className:"h-4 w-4 text-accent"}):(0,r.jsx)(C,{className:"h-4 w-4 text-white/60"})}),(0,r.jsxs)("div",{className:a("max-w-[75%] rounded-2xl px-4 py-2.5",n?"bg-accent/10 border border-accent/20 text-white":"bg-white/5 border border-white/10 text-white/80"),children:[s.thinking&&s.thinking.length>0&&(0,r.jsx)(ec,{thinking:s.thinking}),s.content&&(0,r.jsxs)("div",{className:"whitespace-pre-wrap text-sm leading-relaxed",children:[s.content,s.isStreaming&&!(null==(t=s.toolCalls)?void 0:t.some(e=>"running"===e.state))&&(0,r.jsx)("span",{className:"ml-1 inline-block h-4 w-0.5 animate-pulse bg-accent align-text-bottom"})]}),s.toolCalls&&s.toolCalls.length>0&&(0,r.jsxs)("div",{className:a(s.content&&"mt-2"),children:[s.toolCalls.map(e=>(0,r.jsx)(ed,{tool:e},e.id)),s.isStreaming&&s.toolCalls.some(e=>"running"===e.state)&&(0,r.jsx)("span",{className:"ml-1 inline-block h-4 w-0.5 animate-pulse bg-accent align-text-bottom"})]}),s.isStreaming&&!s.content&&(!s.toolCalls||0===s.toolCalls.length)&&(0,r.jsx)("span",{className:"inline-block h-4 w-0.5 animate-pulse bg-accent align-text-bottom"}),s.timestamp&&(0,r.jsx)("div",{className:"mt-1 text-right text-xs text-white/30",children:c(s.timestamp)})]})]})}function eh(e){let{messages:t,className:s}=e,n=(0,i.useRef)(null);return(0,i.useEffect)(()=>{n.current&&n.current.scrollTo({top:n.current.scrollHeight,behavior:"smooth"})},[t]),(0,r.jsx)("div",{ref:n,className:null!=s?s:"flex-1 overflow-auto p-4 space-y-3 scrollbar-thin",children:0===t.length?(0,r.jsxs)("div",{className:"flex h-full flex-col items-center justify-center text-center",children:[(0,r.jsx)(M,{className:"mb-3 h-8 w-8 text-white/20"}),(0,r.jsx)("p",{className:"text-sm text-white/40",children:"No messages yet"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-white/30",children:"Send a message to start the conversation"})]}):t.map(e=>(0,r.jsx)(ex,{message:e},e.id))})}function em(e){let{input:t,onInputChange:s,onSend:n,sending:l,disabled:o,placeholder:c="Send a message...",attachedFiles:d=[],onFileSelect:x,onRemoveFile:h,className:m}=e,u=(0,i.useRef)(null),p=(0,i.useRef)(null),w=d.filter(e=>!e.uploading),g=(t.trim()||w.length>0)&&!l&&!o;return(0,r.jsxs)("div",{className:a("shrink-0 border-t border-white/10 p-4",m),children:[d.length>0&&(0,r.jsx)("div",{className:"mb-2 flex flex-wrap gap-2",children:d.map(e=>(0,r.jsxs)("div",{className:a("flex items-center gap-1.5 rounded-lg border px-2.5 py-1 text-xs",e.uploading?"border-white/10 bg-white/5 text-white/40":"border-accent/20 bg-accent/5 text-accent"),children:[e.uploading?(0,r.jsx)(W,{className:"h-3 w-3 animate-spin"}):(0,r.jsx)(z,{className:"h-3 w-3"}),(0,r.jsx)("span",{className:"max-w-[180px] truncate",children:e.filename}),!e.uploading&&h&&(0,r.jsx)("button",{onClick:()=>h(e.id),className:"ml-0.5 rounded-full p-0.5 hover:bg-white/10 transition-colors",children:(0,r.jsx)(V,{className:"h-3 w-3"})})]},e.id))}),(0,r.jsxs)("div",{className:"flex items-end gap-3",children:[x&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("input",{ref:p,type:"file",multiple:!0,onChange:x,className:"hidden"}),(0,r.jsx)("button",{onClick:()=>{var e;return null==(e=p.current)?void 0:e.click()},disabled:l||o,className:a("flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border transition-colors","border-white/10 bg-white/5 text-white/40 hover:bg-white/10 hover:text-white/60",(l||o)&&"opacity-50 cursor-not-allowed"),title:"Attach files",children:(0,r.jsx)(z,{className:"h-4 w-4"})})]}),(0,r.jsx)("textarea",{ref:u,value:t,onChange:e=>{s(e.target.value);let t=e.target;t.style.height="auto",t.style.height=Math.min(t.scrollHeight,160)+"px"},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),n())},placeholder:c,rows:1,className:a("w-full resize-none rounded-xl border bg-white/5 px-4 py-3 text-sm text-white","border-white/10 placeholder:text-white/40","focus:border-accent/50 focus:outline-none focus:ring-0")}),(0,r.jsx)("button",{onClick:n,disabled:!g,className:a("flex h-11 w-11 shrink-0 items-center justify-center rounded-xl transition-colors",g?"bg-accent text-white hover:bg-accent/90":"bg-white/5 text-white/20 cursor-not-allowed"),children:l?(0,r.jsx)(W,{className:"h-4 w-4 animate-spin"}):(0,r.jsx)(L,{className:"h-4 w-4"})})]})]})}function eu(e){let{messages:t,input:s,onInputChange:n,onSend:l,sending:i,loading:o,error:c,isActive:d,agentName:x,attachedFiles:h,onFileSelect:m,onRemoveFile:u,className:p}=e;return(0,r.jsxs)("div",{className:a("flex flex-col overflow-hidden",p),children:[o?(0,r.jsxs)("div",{className:"flex flex-1 items-center justify-center",children:[(0,r.jsx)(W,{className:"mr-2 h-5 w-5 animate-spin text-white/40"}),(0,r.jsx)("span",{className:"text-sm text-white/50",children:"Loading session..."})]}):d?(0,r.jsx)(eh,{messages:t}):(0,r.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center text-center px-8",children:[(0,r.jsx)("div",{className:"mb-4 flex h-16 w-16 items-center justify-center rounded-2xl bg-accent/10 border border-accent/20",children:(0,r.jsx)(M,{className:"h-8 w-8 text-accent"})}),(0,r.jsx)("h2",{className:"text-xl font-semibold text-white",children:"Agent Playground"}),(0,r.jsx)("p",{className:"mt-2 max-w-md text-sm text-white/50",children:x?"Start a new conversation with ".concat(x,", or resume a past session from History."):"Select an agent above to get started."}),x&&(0,r.jsxs)("div",{className:"mt-4 inline-flex items-center gap-2 rounded-full bg-white/10 px-4 py-2 text-sm text-white/70",children:[(0,r.jsx)(C,{className:"h-4 w-4 text-accent"}),x]})]}),c&&(0,r.jsx)("div",{className:"shrink-0 mx-4 mb-2 rounded-xl border border-red-500/20 bg-red-500/10 px-4 py-2.5 text-sm text-red-400",children:c}),x&&(0,r.jsx)(em,{input:s,onInputChange:n,onSend:l,sending:i,placeholder:d?"Send a message...":"Send a message to start a new session...",attachedFiles:h,onFileSelect:m,onRemoveFile:u})]})}function ep(e){let{sessions:t,activeSessionId:s,onSelectSession:n,className:l}=e;return(0,r.jsxs)("div",{className:a("w-64 shrink-0 rounded-lg border border-white/10 bg-white/[0.02] flex flex-col overflow-hidden",l),children:[(0,r.jsx)("div",{className:"px-3 py-2 border-b border-white/10 text-xs font-medium text-white/40 uppercase tracking-wider",children:"Recent Sessions"}),(0,r.jsx)("div",{className:"flex-1 overflow-auto scrollbar-thin",children:0===t.length?(0,r.jsx)("p",{className:"px-3 py-6 text-center text-xs text-white/30",children:"No sessions yet"}):t.map(e=>(0,r.jsxs)("button",{onClick:()=>n(e),className:a("w-full text-left px-3 py-2.5 border-b border-white/5 hover:bg-white/5 transition-colors",s===e.id&&"border-l-2 border-l-accent bg-accent/5"),children:[(0,r.jsx)("div",{className:"text-xs font-medium text-white truncate",children:e.agentName}),(0,r.jsxs)("div",{className:"text-[10px] text-white/30 mt-0.5",children:[e.createdAt?new Date(e.createdAt).toLocaleDateString():"No events",(0,r.jsx)("span",{className:"mx-1 text-white/15",children:"|"}),(0,r.jsx)("span",{className:a("active"===e.status?"text-green-400":"text-white/30"),children:e.status})]})]},e.id))})]})}var ew={stdout:"text-green-300",stderr:"text-red-400",system:"text-white/40"};function eg(e){let{logs:t,connected:s,onClear:n,className:l}=e,[o,c]=(0,i.useState)(""),[d,x]=(0,i.useState)(!1),[h,m]=(0,i.useState)(!0),u=(0,i.useRef)(null);(0,i.useEffect)(()=>{h&&u.current&&(u.current.scrollTop=u.current.scrollHeight)},[t,h]);let p=(0,i.useCallback)(()=>{if(!u.current)return;let{scrollTop:e,scrollHeight:t,clientHeight:s}=u.current;m(t-e-s<40)},[]),w=o?t.filter(e=>e.text.toLowerCase().includes(o.toLowerCase())):t;return(0,r.jsxs)("div",{className:a("flex flex-col bg-[#0d1117] rounded-lg border border-white/10 overflow-hidden",l),children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 border-b border-white/10 px-3 py-2 bg-[#161b22]",children:[(0,r.jsx)(F,{className:"h-3.5 w-3.5 text-white/50"}),(0,r.jsx)("span",{className:"text-xs font-medium text-white/60",children:"Terminal"}),(0,r.jsx)("div",{className:a("ml-1 flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium",!0===s?"text-green-400":!1===s?"text-red-400":"text-white/30"),children:!0===s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(U,{className:"h-2.5 w-2.5"})," Live"]}):!1===s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Z,{className:"h-2.5 w-2.5"})," Disconnected"]}):"Connecting..."}),(0,r.jsx)("div",{className:"flex-1"}),(0,r.jsxs)("span",{className:"text-[10px] text-white/30",children:[w.length.toLocaleString()," line",1!==w.length?"s":""]}),(0,r.jsx)("button",{onClick:()=>x(!d),className:a("rounded p-1 text-white/40 hover:bg-white/10 hover:text-white/70 transition-colors",d&&"bg-white/10 text-white/70"),title:"Toggle timestamps",children:(0,r.jsx)(O,{className:"h-3 w-3"})}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(Q,{className:"absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-white/30"}),(0,r.jsx)("input",{type:"text",value:o,onChange:e=>c(e.target.value),placeholder:"Filter...",className:"h-6 w-32 rounded border border-white/10 bg-white/5 pl-7 pr-2 text-[11px] text-white placeholder:text-white/30 focus:border-white/20 focus:outline-none"})]}),!h&&(0,r.jsx)("button",{onClick:()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight,m(!0))},className:"rounded p-1 text-white/40 hover:bg-white/10 hover:text-white/70 transition-colors",title:"Scroll to bottom",children:(0,r.jsx)(Y,{className:"h-3 w-3"})}),n&&(0,r.jsx)("button",{onClick:n,className:"rounded p-1 text-white/40 hover:bg-white/10 hover:text-white/70 transition-colors",title:"Clear",children:(0,r.jsx)(G,{className:"h-3 w-3"})})]}),(0,r.jsx)("div",{ref:u,onScroll:p,className:"flex-1 overflow-auto p-3 font-mono text-xs leading-5 scrollbar-thin min-h-[120px]",children:0===w.length?(0,r.jsx)("div",{className:"flex h-full items-center justify-center text-white/20 text-xs",children:0===t.length?"Waiting for sandbox output...":"No matching lines"}):w.map((e,t)=>(0,r.jsxs)("div",{className:"flex hover:bg-white/5 rounded px-1 -mx-1",children:[d&&(0,r.jsx)("span",{className:"mr-3 shrink-0 select-none text-white/20",children:new Date(e.ts).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}),(0,r.jsx)("span",{className:a("whitespace-pre-wrap break-all",ew[e.level]||"text-white/60"),children:e.text})]},"".concat(e.index,"-").concat(t)))})]})}function ef(e){let{node:t,depth:s,selectedPath:n,expandedDirs:l,onSelectFile:i,onToggleDir:o}=e,c=l.has(t.path),d=n===t.path,x=t.isDir?c?A:E:function(e){var t;let s=null==(t=e.split(".").pop())?void 0:t.toLowerCase();return["ts","tsx","js","jsx","py","rs","go","rb","sh","bash"].includes(s||"")?D:["json","yaml","yml","toml"].includes(s||"")?_:["png","jpg","jpeg","gif","svg","webp","ico"].includes(s||"")?R:B}(t.name);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{onClick:()=>t.isDir?o(t.path):i(t.path),className:a("flex items-center gap-1.5 w-full text-left py-1 pr-2 text-xs transition-colors hover:bg-white/5",d&&!t.isDir&&"bg-accent/10 text-accent",!d&&"text-white/60"),style:{paddingLeft:"".concat(16*s+8,"px")},children:[t.isDir?c?(0,r.jsx)(H,{className:"h-3 w-3 shrink-0 text-white/30"}):(0,r.jsx)(T,{className:"h-3 w-3 shrink-0 text-white/30"}):(0,r.jsx)("span",{className:"w-3"}),(0,r.jsx)(x,{className:a("h-3.5 w-3.5 shrink-0",t.isDir?"text-accent":"text-white/40")}),(0,r.jsx)("span",{className:"truncate",children:t.name}),t.isDir&&t.children.length>0&&(0,r.jsx)("span",{className:"ml-auto text-[10px] text-white/20 shrink-0",children:t.children.length})]}),t.isDir&&c&&t.children.map(e=>(0,r.jsx)(ef,{node:e,depth:s+1,selectedPath:n,expandedDirs:l,onSelectFile:i,onToggleDir:o},e.path))]})}function ej(e){let{nodes:t,selectedPath:s,expandedDirs:n,onSelectFile:l,onToggleDir:i}=e;return(0,r.jsx)("div",{className:"overflow-y-auto scrollbar-thin",children:t.map(e=>(0,r.jsx)(ef,{node:e,depth:0,selectedPath:s,expandedDirs:n,onSelectFile:l,onToggleDir:i},e.path))})}function ev(e){let{files:t,source:s,loading:n,selectedPath:l,fileContent:c,fileLoading:x,fileError:h,expandedDirs:u,filter:p,onFilterChange:w,onSelectFile:g,onToggleDir:f,onRefresh:j,fileBaseUrl:v,className:b}=e,y=(0,i.useRef)(null);if(n)return(0,r.jsxs)("div",{className:a("flex items-center justify-center py-12",b),children:[(0,r.jsx)(W,{className:"mr-2 h-4 w-4 animate-spin text-white/40"}),(0,r.jsx)("span",{className:"text-sm text-white/50",children:"Loading files..."})]});if(0===t.length)return(0,r.jsxs)("div",{className:a("flex flex-col items-center justify-center py-12 text-center",b),children:[(0,r.jsx)(A,{className:"mb-3 h-10 w-10 text-white/20"}),(0,r.jsx)("p",{className:"text-sm font-medium text-white/50",children:"No files in workspace"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-white/40",children:"Files created by the agent will appear here"})]});let N=d(p?t.filter(e=>e.path.toLowerCase().includes(p.toLowerCase())):t),k=t.find(e=>e.path===l),C=v&&l?"".concat(v,"/").concat(l):void 0;return(0,r.jsxs)("div",{className:a("flex flex-col h-full",b),children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 border-b border-white/10 px-3 py-2 shrink-0",children:[s&&(0,r.jsx)("span",{className:a("rounded-full px-2 py-0.5 text-[10px] font-medium border","sandbox"===s?"bg-green-500/10 text-green-400 border-green-500/20":"bg-white/5 text-white/40 border-white/10"),children:s}),(0,r.jsxs)("span",{className:"text-xs text-white/40",children:[t.length," files"]}),(0,r.jsx)("div",{className:"flex-1"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(Q,{className:"absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-white/30"}),(0,r.jsx)("input",{type:"text",value:p,onChange:e=>w(e.target.value),placeholder:"Filter...",className:"w-40 rounded-md border border-white/10 bg-white/5 pl-7 pr-2 py-1 text-xs text-white placeholder:text-white/30 focus:border-accent/50 focus:outline-none"}),p&&(0,r.jsx)("button",{onClick:()=>w(""),className:"absolute right-1.5 top-1/2 -translate-y-1/2 text-white/30 hover:text-white",children:(0,r.jsx)(V,{className:"h-3 w-3"})})]}),(0,r.jsx)("button",{onClick:j,className:"rounded-md p-1 text-white/40 hover:bg-white/5 hover:text-white transition-colors",title:"Refresh",children:(0,r.jsx)(X,{className:"h-3.5 w-3.5"})})]}),(0,r.jsxs)("div",{className:"flex flex-1 min-h-0",children:[(0,r.jsx)("div",{className:"w-64 shrink-0 border-r border-white/10 overflow-y-auto scrollbar-thin",children:(0,r.jsx)(ej,{nodes:N,selectedPath:l,expandedDirs:u,onSelectFile:g,onToggleDir:f})}),(0,r.jsx)("div",{className:"flex-1 min-w-0 flex flex-col overflow-hidden",children:l?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between border-b border-white/10 px-4 py-2 shrink-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,r.jsx)("span",{className:"font-mono text-xs text-white/60 truncate",children:l}),k&&(0,r.jsx)("span",{className:"text-[10px] text-white/30 shrink-0",children:o(k.size)})]}),C&&(0,r.jsx)("a",{href:C,download:!0,className:"rounded-md p-1.5 text-white/40 hover:bg-white/5 hover:text-white transition-colors shrink-0",title:"Download",children:(0,r.jsx)($,{className:"h-3.5 w-3.5"})})]}),(0,r.jsx)("div",{className:"flex-1 overflow-auto bg-[#0d1117]",children:x?(0,r.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,r.jsx)(W,{className:"mr-2 h-4 w-4 animate-spin text-white/40"}),(0,r.jsx)("span",{className:"text-xs text-white/50",children:"Loading..."})]}):h?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center px-4",children:[(0,r.jsx)("p",{className:"text-xs text-white/40",children:h}),C&&(0,r.jsx)("a",{href:C,download:!0,className:"mt-2 text-xs text-accent hover:underline",children:"Download file"})]}):m(l)?(0,r.jsx)("div",{className:"flex items-center justify-center p-4",children:C&&(0,r.jsx)("img",{src:C,alt:l,className:"max-w-full max-h-[60vh] object-contain rounded"})}):(0,r.jsx)("pre",{ref:y,className:"p-4 text-xs font-mono text-white/70 leading-relaxed whitespace-pre-wrap break-words",children:c})})]}):(0,r.jsx)("div",{className:"flex flex-1 items-center justify-center text-center",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(B,{className:"mx-auto mb-2 h-8 w-8 text-white/15"}),(0,r.jsx)("p",{className:"text-xs text-white/30",children:"Select a file to view its contents"})]})})})]})]})}function eb(e){let{terminalOpen:t,onToggleTerminal:s,filesOpen:n,onToggleFiles:l,className:i}=e;return(0,r.jsxs)("div",{className:a("flex border-t border-white/10 bg-[#161b22] rounded-b-lg",i),children:[(0,r.jsxs)("button",{onClick:s,className:a("flex flex-1 items-center justify-center gap-1.5 py-1 text-[10px] font-medium transition-colors",t?"text-accent hover:text-accent/80":"text-white/40 hover:text-white/60 hover:bg-[#1c2128]"),children:[(0,r.jsx)(F,{className:"h-3 w-3"}),"Terminal",t?(0,r.jsx)(H,{className:"h-3 w-3"}):(0,r.jsx)(I,{className:"h-3 w-3"})]}),(0,r.jsx)("div",{className:"w-px bg-white/10"}),(0,r.jsxs)("button",{onClick:l,className:a("flex flex-1 items-center justify-center gap-1.5 py-1 text-[10px] font-medium transition-colors",n?"text-accent hover:text-accent/80":"text-white/40 hover:text-white/60 hover:bg-[#1c2128]"),children:[(0,r.jsx)(A,{className:"h-3 w-3"}),"Files",n?(0,r.jsx)(H,{className:"h-3 w-3"}):(0,r.jsx)(I,{className:"h-3 w-3"})]})]})}function ey(e){let{client:t,sessionId:s,historical:n,pollInterval:l=500}=e,[r,a]=(0,i.useState)([]),[o,c]=(0,i.useState)(null),d=(0,i.useRef)(-1),x=(0,i.useRef)(null),h=(0,i.useCallback)(async()=>{try{let e=d.current>=0?{after:d.current}:void 0,n=await t.getSessionLogs(s,e);c(!0),n.logs&&n.logs.length>0&&(a(e=>[...e,...n.logs]),d.current=n.logs[n.logs.length-1].index)}catch(e){c(!1)}},[t,s]);return(0,i.useEffect)(()=>{if(a([]),d.current=-1,c(null),h(),!n)return x.current=setInterval(h,l),()=>{x.current&&clearInterval(x.current)}},[s,n,l,h]),{logs:r,connected:o,clearLogs:(0,i.useCallback)(()=>{a([])},[])}}function eN(e){let{client:t,sessionId:s}=e,[n,l]=(0,i.useState)([]),[r,a]=(0,i.useState)(null),[o,c]=(0,i.useState)(!0),[d,x]=(0,i.useState)(null),[h,m]=(0,i.useState)(null),[u,p]=(0,i.useState)(!1),[w,g]=(0,i.useState)(null),[f,j]=(0,i.useState)(new Set),[v,b]=(0,i.useState)(""),y=(0,i.useCallback)(async()=>{c(!0);try{let e=await t.getSessionFiles(s);l(e.files||[]),a(e.source||null);let n=new Set;for(let t of e.files||[]){let e=t.path.split("/")[0];t.path.includes("/")&&n.add(e)}j(n)}catch(e){}finally{c(!1)}},[t,s]);return(0,i.useEffect)(()=>{y()},[y]),{files:n,source:r,loading:o,selectedPath:d,fileContent:h,fileLoading:u,fileError:w,expandedDirs:f,filter:v,setFilter:b,selectFile:(0,i.useCallback)(async e=>{var n;x(e),m(null),g(null);let l=null==(n=e.split(".").pop())?void 0:n.toLowerCase();if(!new Set(["png","jpg","jpeg","gif","svg","webp","ico"]).has(l||"")){p(!0);try{let n=await t.getSessionFile(s,e);m(n.content||"")}catch(e){g("Failed to load file content")}finally{p(!1)}}},[t,s]),toggleDir:(0,i.useCallback)(e=>{j(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),refresh:y}}function ek(e){let{className:t}=e,{client:s,chat:n,agents:l,sessions:i,health:o,fileUpload:c,selectedAgent:d,setSelectedAgent:x,showHistory:h,setShowHistory:m,terminalOpen:u,setTerminalOpen:p,filesOpen:w,setFilesOpen:g}=b(),f=l.agents.find(e=>(e.slug||e.name)===d),j=null!==n.sessionId;return(0,r.jsxs)("div",{className:a("flex flex-col",t),children:[(0,r.jsx)(eo,{agents:l.agents,selectedAgent:d,onAgentChange:x,runtimeConnected:o.connected,showHistory:h,onToggleHistory:()=>m(!h),sessionId:n.sessionId,onNewChat:n.startNewChat}),(0,r.jsxs)("div",{className:"flex flex-1 gap-4 min-h-0",children:[h&&(0,r.jsx)(ep,{sessions:i.sessions,activeSessionId:n.sessionId,onSelectSession:e=>{n.loadSession(e.id),m(!1)}}),(0,r.jsxs)("div",{className:"flex-1 flex flex-col min-w-0 gap-0",children:[(0,r.jsx)(eu,{messages:n.messages,input:n.input,onInputChange:n.setInput,onSend:n.send,sending:n.sending,loading:n.loading,error:n.error,isActive:j,agentName:null==f?void 0:f.name,attachedFiles:n.attachedFiles,onFileSelect:c.handleFileSelect,onRemoveFile:c.removeFile,className:a("rounded-lg border border-white/10 bg-white/[0.02]",u&&n.sessionId?"flex-1 min-h-0":"flex-1")}),n.sessionId&&(0,r.jsx)("div",{className:a("shrink-0 transition-all",u?"h-64":"h-0"),children:u&&(0,r.jsx)(eC,{client:s,sessionId:n.sessionId})}),n.sessionId&&(0,r.jsx)("div",{className:a("shrink-0 transition-all",w?"h-72":"h-0"),children:w&&(0,r.jsx)(eS,{client:s,sessionId:n.sessionId})}),n.sessionId&&(0,r.jsx)(eb,{terminalOpen:u,onToggleTerminal:()=>p(!u),filesOpen:w,onToggleFiles:()=>g(!w)})]})]})]})}function eC(e){let{client:t,sessionId:s}=e,{logs:n,connected:l,clearLogs:i}=ey({client:t,sessionId:s});return(0,r.jsx)(eg,{logs:n,connected:l,onClear:i,className:"h-full rounded-t-none border-t-0"})}function eS(e){let{client:t,sessionId:s}=e,n=eN({client:t,sessionId:s});return(0,r.jsx)(ev,{files:n.files,source:n.source,loading:n.loading,selectedPath:n.selectedPath,fileContent:n.fileContent,fileLoading:n.fileLoading,fileError:n.fileError,expandedDirs:n.expandedDirs,filter:n.filter,onFilterChange:n.setFilter,onSelectFile:n.selectFile,onToggleDir:n.toggleDir,onRefresh:n.refresh,className:"h-full border-t border-white/10"})}function eL(e){let{client:t,defaultAgent:s,className:n}=e;return(0,r.jsx)(y,{client:t,defaultAgent:s,children:(0,r.jsx)(ek,{className:n})})}var eM=[{key:"description",label:"Description",type:"text",placeholder:"A brief description of this agent"},{key:"model",label:"Model",type:"text",placeholder:"e.g. claude-sonnet-4-5-20250514"},{key:"systemPrompt",label:"System Prompt",type:"textarea",placeholder:"System prompt for the agent..."},{key:"max_turns",label:"Max Turns",type:"number",placeholder:"e.g. 10"},{key:"permission_mode",label:"Permission Mode",type:"select",placeholder:"Select permission mode",options:["default","plan","bypassPermissions"]}];function eF(e){let{client:t,agentName:s,className:n,onSaved:l}=e,[o,c]=(0,i.useState)({}),[d,x]=(0,i.useState)({}),[h,m]=(0,i.useState)(!0),[u,p]=(0,i.useState)(!1),[w,g]=(0,i.useState)(null),[f,j]=(0,i.useState)(!1),v=(0,i.useCallback)(async()=>{m(!0),g(null);try{let e=await t.getAgentConfig(s);c(e),x(e)}catch(e){g(e instanceof Error?e.message:"Failed to fetch config")}finally{m(!1)}},[t,s]);(0,i.useEffect)(()=>{v()},[v]);let b=async()=>{p(!0),g(null),j(!1);try{let e={};for(let t of eM)o[t.key]!==d[t.key]&&(e[t.key]=o[t.key]);if(0===Object.keys(e).length)return void j(!0);let n=await t.updateAgentConfig(s,e),i=n&&"object"==typeof n&&"config"in n&&n.config?n.config:{...d,...e};c(i),x(i),j(!0),null==l||l(i)}catch(e){g(e instanceof Error?e.message:"Failed to save config")}finally{p(!1)}},y=(e,t)=>{c(s=>({...s,[e]:t})),j(!1)},N=JSON.stringify(o)!==JSON.stringify(d);return h?(0,r.jsxs)("div",{className:a("flex items-center justify-center py-12",n),children:[(0,r.jsx)(W,{className:"mr-2 h-4 w-4 animate-spin text-white/40"}),(0,r.jsx)("span",{className:"text-sm text-white/50",children:"Loading config..."})]}):(0,r.jsxs)("div",{className:a("space-y-4",n),children:[(0,r.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[N&&(0,r.jsxs)("button",{onClick:()=>{c({...d}),g(null),j(!1)},className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg text-white/70 hover:text-white hover:bg-white/10 transition-colors",children:[(0,r.jsx)(X,{className:"h-3.5 w-3.5"})," Reset"]}),(0,r.jsxs)("button",{onClick:b,disabled:u||!N,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg bg-indigo-500 text-white hover:bg-indigo-400 disabled:opacity-50 disabled:pointer-events-none transition-colors",children:[u?(0,r.jsx)(W,{className:"h-3.5 w-3.5 animate-spin"}):(0,r.jsx)(ee,{className:"h-3.5 w-3.5"}),"Save"]})]}),w&&(0,r.jsx)("div",{className:"text-sm text-red-400 bg-red-500/10 border border-red-500/20 rounded-lg px-4 py-2",children:w}),f&&(0,r.jsx)("div",{className:"text-sm text-green-400 bg-green-500/10 border border-green-500/20 rounded-lg px-4 py-2",children:"Configuration saved."}),(0,r.jsx)("div",{className:"space-y-4 rounded-xl border border-white/10 bg-white/[0.02] p-4",children:eM.map(e=>{var t,s;let n=null!=(t=o[e.key])?t:"";return"textarea"===e.type?(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-white/70",children:e.label}),(0,r.jsx)("textarea",{value:String(n),onChange:t=>y(e.key,t.target.value||void 0),rows:5,placeholder:e.placeholder,className:"flex w-full rounded-lg border px-3 py-2 text-sm bg-white/5 border-white/10 text-white placeholder:text-white/40 focus-visible:outline-none focus-visible:border-indigo-500/50 resize-none"})]},e.key):"select"===e.type?(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-white/70",children:e.label}),(0,r.jsxs)("select",{value:String(n),onChange:t=>y(e.key,t.target.value||void 0),className:"flex w-full rounded-lg border px-3 py-2 text-sm bg-white/5 border-white/10 text-white focus-visible:outline-none focus-visible:border-indigo-500/50",children:[(0,r.jsx)("option",{value:"",style:{background:"#1c2129"},children:"Not set"}),null==(s=e.options)?void 0:s.map(e=>(0,r.jsx)("option",{value:e,style:{background:"#1c2129"},children:e},e))]})]},e.key):"number"===e.type?(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-white/70",children:e.label}),(0,r.jsx)("input",{type:"number",value:void 0===n||""===n?"":Number(n),onChange:t=>y(e.key,t.target.value?Number(t.target.value):void 0),placeholder:e.placeholder,className:"flex w-full rounded-lg border px-3 py-2 text-sm bg-white/5 border-white/10 text-white placeholder:text-white/40 focus-visible:outline-none focus-visible:border-indigo-500/50"})]},e.key):(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-white/70",children:e.label}),(0,r.jsx)("input",{type:"text",value:String(n),onChange:t=>y(e.key,t.target.value||void 0),placeholder:e.placeholder,className:"flex w-full rounded-lg border px-3 py-2 text-sm bg-white/5 border-white/10 text-white placeholder:text-white/40 focus-visible:outline-none focus-visible:border-indigo-500/50"})]},e.key)})})]})}function eA(e){let{client:t,agentName:s,className:n,onActivated:l}=e,[o,d]=(0,i.useState)([]),[x,h]=(0,i.useState)(!0),[m,u]=(0,i.useState)(null),[p,w]=(0,i.useState)(!1),[g,f]=(0,i.useState)(null),j=(0,i.useCallback)(async()=>{try{h(!0);let e=await t.listAgentVersions(s);d(e)}catch(e){f(e instanceof Error?e.message:"Failed to fetch versions")}finally{h(!1)}},[t,s]);(0,i.useEffect)(()=>{j()},[j]);let v=async e=>{u(e.versionNumber),f(null);try{await t.activateAgentVersion(s,e.versionNumber),await j(),null==l||l(e)}catch(e){f(e instanceof Error?e.message:"Failed to activate version")}finally{u(null)}};return x?(0,r.jsxs)("div",{className:a("flex items-center justify-center py-12",n),children:[(0,r.jsx)(W,{className:"mr-2 h-4 w-4 animate-spin text-white/40"}),(0,r.jsx)("span",{className:"text-sm text-white/50",children:"Loading versions..."})]}):(0,r.jsxs)("div",{className:a("space-y-4",n),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("span",{className:"text-sm text-white/50",children:[o.length," version",1!==o.length?"s":""]}),(0,r.jsxs)("button",{onClick:()=>w(!0),className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg bg-indigo-500 text-white hover:bg-indigo-400 transition-colors",children:[(0,r.jsx)(P,{className:"h-3.5 w-3.5"})," Create Version"]})]}),g&&(0,r.jsx)("div",{className:"text-sm text-red-400 bg-red-500/10 border border-red-500/20 rounded-lg px-4 py-2",children:g}),0===o.length?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,r.jsx)(et,{className:"mb-3 h-10 w-10 text-white/20"}),(0,r.jsx)("p",{className:"text-sm font-medium text-white/50",children:"No versions yet"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-white/40",children:"Create your first version to snapshot the agent config."})]}):(0,r.jsx)("div",{className:"space-y-2",children:o.map(e=>(0,r.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-white/10 bg-white/[0.02] px-4 py-3",children:[(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("span",{className:"text-sm font-semibold text-white",children:["v",e.versionNumber]}),e.name&&(0,r.jsx)("span",{className:"text-sm text-white/50",children:e.name}),e.isActive&&(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-green-500/10 px-2 py-0.5 text-xs font-medium text-green-400",children:[(0,r.jsx)(J,{className:"h-3 w-3"})," Active"]})]}),e.releaseNotes&&(0,r.jsx)("p",{className:"text-xs text-white/40 mt-1",children:e.releaseNotes}),(0,r.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,r.jsx)("span",{className:"text-xs text-white/30",children:c(e.createdAt)}),e.systemPrompt&&(0,r.jsx)("span",{className:"text-xs text-white/30",children:"Has system prompt"}),e.knowledgeFiles&&e.knowledgeFiles.length>0&&(0,r.jsxs)("span",{className:"text-xs text-white/30",children:[e.knowledgeFiles.length," file",1!==e.knowledgeFiles.length?"s":""]})]})]}),!e.isActive&&(0,r.jsxs)("button",{onClick:()=>v(e),disabled:m===e.versionNumber,className:"inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium rounded-lg border border-white/20 bg-white/5 text-white hover:bg-white/10 disabled:opacity-50 transition-colors",children:[m===e.versionNumber?(0,r.jsx)(W,{className:"h-3 w-3 animate-spin"}):(0,r.jsx)(J,{className:"h-3 w-3"}),"Activate"]})]},e.id))}),p&&(0,r.jsx)(eE,{client:t,agentName:s,onClose:()=>w(!1),onCreated:()=>{w(!1),j()}})]})}function eE(e){let{client:t,agentName:s,onClose:n,onCreated:l}=e,[a,o]=(0,i.useState)(""),[c,d]=(0,i.useState)(""),[x,h]=(0,i.useState)(""),[m,u]=(0,i.useState)(!1),[p,w]=(0,i.useState)(null),g=async()=>{u(!0),w(null);try{await t.createAgentVersion(s,{name:a||void 0,systemPrompt:c||void 0,releaseNotes:x||void 0}),l()}catch(e){w(e instanceof Error?e.message:"Failed to create version")}finally{u(!1)}};return(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:(0,r.jsxs)("div",{className:"w-full max-w-lg max-h-[90vh] overflow-auto rounded-xl border border-white/10 bg-[#1c2129] p-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-white",children:"Create Version"}),(0,r.jsx)("button",{onClick:n,className:"text-white/40 hover:text-white",children:(0,r.jsx)(V,{className:"h-5 w-5"})})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-white/70",children:"Version Name (optional)"}),(0,r.jsx)("input",{type:"text",value:a,onChange:e=>o(e.target.value),placeholder:"e.g. v2 - improved grounding",className:"flex w-full rounded-lg border px-3 py-2 text-sm bg-white/5 border-white/10 text-white placeholder:text-white/40 focus-visible:outline-none focus-visible:border-indigo-500/50"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-white/70",children:"System Prompt (optional)"}),(0,r.jsx)("textarea",{value:c,onChange:e=>d(e.target.value),rows:4,placeholder:"System prompt for this version...",className:"flex w-full rounded-lg border px-3 py-2 text-sm bg-white/5 border-white/10 text-white placeholder:text-white/40 focus-visible:outline-none focus-visible:border-indigo-500/50 resize-none"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-white/70",children:"Release Notes (optional)"}),(0,r.jsx)("textarea",{value:x,onChange:e=>h(e.target.value),rows:2,placeholder:"What changed in this version...",className:"flex w-full rounded-lg border px-3 py-2 text-sm bg-white/5 border-white/10 text-white placeholder:text-white/40 focus-visible:outline-none focus-visible:border-indigo-500/50 resize-none"})]}),p&&(0,r.jsx)("p",{className:"text-sm text-red-400",children:p}),(0,r.jsxs)("div",{className:"flex justify-end gap-3 pt-2",children:[(0,r.jsx)("button",{onClick:n,className:"px-3 py-1.5 text-sm text-white/70 hover:text-white hover:bg-white/10 rounded-lg transition-colors",children:"Cancel"}),(0,r.jsx)("button",{onClick:g,disabled:m,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-lg bg-indigo-500 text-white hover:bg-indigo-400 disabled:opacity-50 transition-colors",children:m?"Creating...":"Create Version"})]})]})]})})}function eB(e){let{client:t,agentName:s,className:n}=e,[l,c]=(0,i.useState)([]),[d,x]=(0,i.useState)(!0),[h,m]=(0,i.useState)({}),[u,p]=(0,i.useState)(null),[w,g]=(0,i.useState)(null),[f,j]=(0,i.useState)(!1),[v,b]=(0,i.useState)(null),y=(0,i.useRef)(null),N=(0,i.useCallback)(async()=>{try{x(!0);let e=await t.listAgentFiles(s);c(e.files)}catch(e){b(e instanceof Error?e.message:"Failed to fetch files")}finally{x(!1)}},[t,s]);(0,i.useEffect)(()=>{N()},[N]);let k=async e=>{if(void 0!==h[e])return void m(t=>{let s={...t};return delete s[e],s});p(e);try{let n=await t.getAgentFile(s,e);m(t=>({...t,[e]:n.content}))}catch(t){m(t=>({...t,[e]:"(Failed to load)"}))}finally{p(null)}},C=async e=>{g(e),b(null);try{await t.deleteAgentFile(s,e),N()}catch(e){b(e instanceof Error?e.message:"Failed to delete file")}finally{g(null)}},S=async e=>{j(!0),b(null);try{let n=[];for(let t of Array.from(e)){let e=await t.arrayBuffer(),s=btoa(String.fromCharCode(...new Uint8Array(e)));n.push({path:t.name,content:s})}await t.uploadAgentFiles(s,n),N()}catch(e){b(e instanceof Error?e.message:"Failed to upload files")}finally{j(!1)}};return d?(0,r.jsxs)("div",{className:a("flex items-center justify-center py-12",n),children:[(0,r.jsx)(W,{className:"mr-2 h-4 w-4 animate-spin text-white/40"}),(0,r.jsx)("span",{className:"text-sm text-white/50",children:"Loading files..."})]}):(0,r.jsxs)("div",{className:a("space-y-4",n),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("span",{className:"text-sm text-white/50",children:[l.length," file",1!==l.length?"s":""]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("button",{onClick:N,className:"p-1.5 text-white/40 hover:text-white rounded transition-colors",children:(0,r.jsx)(X,{className:"h-4 w-4"})}),(0,r.jsxs)("button",{onClick:()=>{var e;return null==(e=y.current)?void 0:e.click()},disabled:f,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg bg-indigo-500 text-white hover:bg-indigo-400 disabled:opacity-50 transition-colors",children:[f?(0,r.jsx)(W,{className:"h-3.5 w-3.5 animate-spin"}):(0,r.jsx)(el,{className:"h-3.5 w-3.5"}),"Upload"]}),(0,r.jsx)("input",{ref:y,type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files&&S(e.target.files)}})]})]}),v&&(0,r.jsx)("div",{className:"text-sm text-red-400 bg-red-500/10 border border-red-500/20 rounded-lg px-4 py-2",children:v}),0===l.length?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,r.jsx)(en,{className:"mb-3 h-10 w-10 text-white/20"}),(0,r.jsx)("p",{className:"text-sm font-medium text-white/50",children:"No knowledge files"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-white/40",children:"Upload files for this agent's knowledge base."})]}):(0,r.jsx)("div",{className:"space-y-1",children:l.map(e=>(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-white/10 bg-white/[0.02] px-3 py-2",children:[(0,r.jsxs)("button",{onClick:()=>k(e.path),className:"flex items-center gap-2 min-w-0 flex-1 text-left",children:[u===e.path?(0,r.jsx)(W,{className:"h-3.5 w-3.5 animate-spin text-white/40 shrink-0"}):void 0!==h[e.path]?(0,r.jsx)(H,{className:"h-3.5 w-3.5 text-white/40 shrink-0"}):(0,r.jsx)(T,{className:"h-3.5 w-3.5 text-white/40 shrink-0"}),(0,r.jsx)(B,{className:"h-3.5 w-3.5 text-white/40 shrink-0"}),(0,r.jsx)("span",{className:"text-sm text-white truncate",children:e.path}),(0,r.jsx)("span",{className:"text-xs text-white/30 shrink-0",children:o(e.size)})]}),(0,r.jsx)("button",{onClick:()=>C(e.path),disabled:w===e.path,className:"p-1 text-white/30 hover:text-red-400 transition-colors shrink-0 ml-2",children:w===e.path?(0,r.jsx)(W,{className:"h-3.5 w-3.5 animate-spin"}):(0,r.jsx)(G,{className:"h-3.5 w-3.5"})})]}),void 0!==h[e.path]&&(0,r.jsx)("div",{className:"ml-4 mt-1 mb-2 rounded-lg border border-white/5 bg-black/20 p-3",children:(0,r.jsx)("pre",{className:"text-xs text-white/70 whitespace-pre-wrap break-words max-h-60 overflow-auto",children:h[e.path]})})]},e.path))})]})}function eD(e){let{client:t,agentName:s,className:n}=e,[l,o]=(0,i.useState)("cases"),[c,d]=(0,i.useState)([]),[x,h]=(0,i.useState)([]),[m,u]=(0,i.useState)(!0),[p,w]=(0,i.useState)(!0),[g,f]=(0,i.useState)(!1),[j,v]=(0,i.useState)(!1),[b,y]=(0,i.useState)(null),N=(0,i.useCallback)(async()=>{try{u(!0);let e=await t.listEvalCases(s);d(e)}catch(e){y(e instanceof Error?e.message:"Failed to fetch eval cases")}finally{u(!1)}},[t,s]),k=(0,i.useCallback)(async()=>{try{w(!0);let e=await t.listEvalRuns(s);h(e)}catch(e){y(e instanceof Error?e.message:"Failed to fetch eval runs")}finally{w(!1)}},[t,s]);(0,i.useEffect)(()=>{N(),k()},[N,k]);let C=(0,i.useRef)(null);(0,i.useEffect)(()=>(x.some(e=>"pending"===e.status||"running"===e.status)&&(C.current=setInterval(k,5e3)),()=>{C.current&&clearInterval(C.current)}),[x,k]);let S=async e=>{y(null);try{await t.deleteEvalCase(s,e),N()}catch(e){y(e instanceof Error?e.message:"Failed to delete case")}};return(0,r.jsxs)("div",{className:a("space-y-4",n),children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 p-1 bg-white/5 rounded-lg w-fit",children:[(0,r.jsxs)("button",{onClick:()=>o("cases"),className:a("px-3 py-1.5 text-xs font-medium rounded-md transition-colors","cases"===l?"bg-white/10 text-white":"text-white/50 hover:text-white"),children:["Cases (",c.length,")"]}),(0,r.jsxs)("button",{onClick:()=>o("runs"),className:a("px-3 py-1.5 text-xs font-medium rounded-md transition-colors","runs"===l?"bg-white/10 text-white":"text-white/50 hover:text-white"),children:["Runs (",x.length,")"]})]}),b&&(0,r.jsx)("div",{className:"text-sm text-red-400 bg-red-500/10 border border-red-500/20 rounded-lg px-4 py-2",children:b}),"cases"===l?(0,r.jsx)(e_,{cases:c,loading:m,onAdd:()=>f(!0),onDelete:S}):(0,r.jsx)(eR,{client:t,agentName:s,runs:x,loading:p,onRun:()=>v(!0)}),g&&(0,r.jsx)(eW,{client:t,agentName:s,onClose:()=>f(!1),onCreated:()=>{f(!1),N()}}),j&&(0,r.jsx)(eH,{client:t,agentName:s,onClose:()=>v(!1),onStarted:()=>{v(!1),k()}})]})}function e_(e){let{cases:t,loading:s,onAdd:n,onDelete:l}=e,[a,o]=(0,i.useState)(new Set);return s?(0,r.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,r.jsx)(W,{className:"mr-2 h-4 w-4 animate-spin text-white/40"}),(0,r.jsx)("span",{className:"text-sm text-white/50",children:"Loading cases..."})]}):(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("div",{className:"flex items-center justify-end",children:(0,r.jsxs)("button",{onClick:n,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg bg-indigo-500 text-white hover:bg-indigo-400 transition-colors",children:[(0,r.jsx)(P,{className:"h-3.5 w-3.5"})," Add Case"]})}),0===t.length?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,r.jsx)(es,{className:"mb-3 h-10 w-10 text-white/20"}),(0,r.jsx)("p",{className:"text-sm font-medium text-white/50",children:"No eval cases"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-white/40",children:"Add test cases to evaluate your agent."})]}):(0,r.jsx)("div",{className:"space-y-1",children:t.map(e=>{let t=a.has(e.id);return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-white/10 bg-white/[0.02] px-3 py-2",children:[(0,r.jsxs)("button",{onClick:()=>o(s=>{let n=new Set(s);return t?n.delete(e.id):n.add(e.id),n}),className:"flex items-center gap-2 min-w-0 flex-1 text-left",children:[t?(0,r.jsx)(H,{className:"h-3.5 w-3.5 text-white/40 shrink-0"}):(0,r.jsx)(T,{className:"h-3.5 w-3.5 text-white/40 shrink-0"}),(0,r.jsx)("span",{className:"text-sm text-white truncate",children:e.question}),e.category&&(0,r.jsx)("span",{className:"text-xs text-white/30 shrink-0",children:e.category})]}),(0,r.jsx)("button",{onClick:()=>l(e.id),className:"p-1 text-white/30 hover:text-red-400 transition-colors shrink-0 ml-2",children:(0,r.jsx)(V,{className:"h-3.5 w-3.5"})})]}),t&&(0,r.jsxs)("div",{className:"ml-4 mt-1 mb-2 rounded-lg border border-white/5 bg-black/20 p-3 space-y-2",children:[e.expectedTopics&&e.expectedTopics.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-xs text-white/40",children:"Expected topics: "}),(0,r.jsx)("span",{className:"text-xs text-white/60",children:e.expectedTopics.join(", ")})]}),e.referenceAnswer&&(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-xs text-white/40",children:"Reference: "}),(0,r.jsx)("span",{className:"text-xs text-white/60",children:e.referenceAnswer})]}),e.tags&&e.tags.length>0&&(0,r.jsx)("div",{className:"flex gap-1",children:e.tags.map(e=>(0,r.jsx)("span",{className:"text-xs bg-white/5 text-white/50 px-1.5 py-0.5 rounded",children:e},e))})]})]},e.id)})})]})}function eR(e){let{client:t,agentName:s,runs:n,loading:l,onRun:o}=e,[d,x]=(0,i.useState)(null),[h,m]=(0,i.useState)([]),[u,p]=(0,i.useState)(!1),w=async e=>{if(d===e)return void x(null);x(e),p(!0);try{let n=await t.getEvalRunResults(s,e);m(n)}catch(e){m([])}finally{p(!1)}};return l?(0,r.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,r.jsx)(W,{className:"mr-2 h-4 w-4 animate-spin text-white/40"}),(0,r.jsx)("span",{className:"text-sm text-white/50",children:"Loading runs..."})]}):(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("div",{className:"flex items-center justify-end",children:(0,r.jsxs)("button",{onClick:o,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg bg-indigo-500 text-white hover:bg-indigo-400 transition-colors",children:[(0,r.jsx)(ei,{className:"h-3.5 w-3.5"})," Run Evals"]})}),0===n.length?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,r.jsx)(es,{className:"mb-3 h-10 w-10 text-white/20"}),(0,r.jsx)("p",{className:"text-sm font-medium text-white/50",children:"No eval runs yet"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-white/40",children:"Start a run to evaluate your agent."})]}):(0,r.jsx)("div",{className:"space-y-2",children:n.map(e=>{var t,s;let n="completed"===e.status?"text-green-400":"failed"===e.status?"text-red-400":"running"===e.status?"text-yellow-400":"text-white/50",l="completed"===e.status?J:"failed"===e.status?K:"running"===e.status?W:es,i=d===e.id;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("button",{onClick:()=>w(e.id),className:"flex items-center justify-between w-full rounded-xl border border-white/10 bg-white/[0.02] px-4 py-3 text-left hover:bg-white/[0.04] transition-colors",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,r.jsx)(l,{className:a("h-4 w-4 shrink-0",n,"running"===e.status&&"animate-spin")}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("span",{className:"text-sm font-medium text-white",children:[e.status," ",null!=e.versionNumber&&"(v".concat(e.versionNumber,")")]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,r.jsx)("span",{className:"text-xs text-white/30",children:c(e.createdAt)}),(0,r.jsxs)("span",{className:"text-xs text-white/30",children:[null!=(t=e.completedCases)?t:0,"/",null!=(s=e.totalCases)?s:0," cases"]})]})]})]}),i?(0,r.jsx)(H,{className:"h-4 w-4 text-white/30"}):(0,r.jsx)(T,{className:"h-4 w-4 text-white/30"})]}),i&&(0,r.jsx)("div",{className:"ml-4 mt-1 mb-2 space-y-1",children:u?(0,r.jsxs)("div",{className:"flex items-center gap-2 py-4 justify-center",children:[(0,r.jsx)(W,{className:"h-3 w-3 animate-spin text-white/40"}),(0,r.jsx)("span",{className:"text-xs text-white/40",children:"Loading results..."})]}):0===h.length?(0,r.jsx)("p",{className:"text-xs text-white/40 py-4 text-center",children:"No results yet."}):h.map(e=>(0,r.jsxs)("div",{className:"rounded-lg border border-white/5 bg-black/20 px-3 py-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:a("text-xs font-medium","completed"===e.status?"text-green-400":"error"===e.status?"text-red-400":"text-white/50"),children:e.status}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[null!=e.topicScore&&(0,r.jsxs)("span",{className:"text-xs text-white/40",children:["topic: ",(100*e.topicScore).toFixed(0),"%"]}),null!=e.safetyScore&&(0,r.jsxs)("span",{className:"text-xs text-white/40",children:["safety: ",(100*e.safetyScore).toFixed(0),"%"]}),null!=e.humanScore&&(0,r.jsxs)("span",{className:"inline-flex items-center gap-0.5 text-xs text-yellow-400",children:[(0,r.jsx)(er,{className:"h-3 w-3"})," ",e.humanScore]}),null!=e.latencyMs&&(0,r.jsxs)("span",{className:"text-xs text-white/30",children:[e.latencyMs,"ms"]})]})]}),e.agentResponse&&(0,r.jsx)("p",{className:"text-xs text-white/50 mt-1 line-clamp-2",children:e.agentResponse}),e.error&&(0,r.jsx)("p",{className:"text-xs text-red-400/70 mt-1",children:e.error})]},e.id))})]},e.id)})})]})}function eW(e){let{client:t,agentName:s,onClose:n,onCreated:l}=e,[a,o]=(0,i.useState)(""),[c,d]=(0,i.useState)(""),[x,h]=(0,i.useState)(""),[m,u]=(0,i.useState)(""),[p,w]=(0,i.useState)(!1),[g,f]=(0,i.useState)(null),j=async()=>{if(!a.trim())return void f("Question is required");w(!0),f(null);try{await t.createEvalCase(s,{question:a.trim(),expectedTopics:c?c.split(",").map(e=>e.trim()).filter(Boolean):void 0,referenceAnswer:x||void 0,category:m||void 0}),l()}catch(e){f(e instanceof Error?e.message:"Failed to create case")}finally{w(!1)}};return(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:(0,r.jsxs)("div",{className:"w-full max-w-lg max-h-[90vh] overflow-auto rounded-xl border border-white/10 bg-[#1c2129] p-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-white",children:"Add Eval Case"}),(0,r.jsx)("button",{onClick:n,className:"text-white/40 hover:text-white",children:(0,r.jsx)(V,{className:"h-5 w-5"})})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-white/70",children:"Question *"}),(0,r.jsx)("textarea",{value:a,onChange:e=>o(e.target.value),rows:3,placeholder:"What question should the agent answer?",className:"flex w-full rounded-lg border px-3 py-2 text-sm bg-white/5 border-white/10 text-white placeholder:text-white/40 focus-visible:outline-none focus-visible:border-indigo-500/50 resize-none"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-white/70",children:"Expected Topics (comma-separated)"}),(0,r.jsx)("input",{type:"text",value:c,onChange:e=>d(e.target.value),placeholder:"e.g. pricing, features, support",className:"flex w-full rounded-lg border px-3 py-2 text-sm bg-white/5 border-white/10 text-white placeholder:text-white/40 focus-visible:outline-none focus-visible:border-indigo-500/50"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-white/70",children:"Reference Answer (optional)"}),(0,r.jsx)("textarea",{value:x,onChange:e=>h(e.target.value),rows:2,placeholder:"Ideal answer for comparison...",className:"flex w-full rounded-lg border px-3 py-2 text-sm bg-white/5 border-white/10 text-white placeholder:text-white/40 focus-visible:outline-none focus-visible:border-indigo-500/50 resize-none"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-white/70",children:"Category (optional)"}),(0,r.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"e.g. general, technical, safety",className:"flex w-full rounded-lg border px-3 py-2 text-sm bg-white/5 border-white/10 text-white placeholder:text-white/40 focus-visible:outline-none focus-visible:border-indigo-500/50"})]}),g&&(0,r.jsx)("p",{className:"text-sm text-red-400",children:g}),(0,r.jsxs)("div",{className:"flex justify-end gap-3 pt-2",children:[(0,r.jsx)("button",{onClick:n,className:"px-3 py-1.5 text-sm text-white/70 hover:text-white hover:bg-white/10 rounded-lg transition-colors",children:"Cancel"}),(0,r.jsx)("button",{onClick:j,disabled:p,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-lg bg-indigo-500 text-white hover:bg-indigo-400 disabled:opacity-50 transition-colors",children:p?"Adding...":"Add Case"})]})]})]})})}function eH(e){let{client:t,agentName:s,onClose:n,onStarted:l}=e,[a,o]=(0,i.useState)(""),[c,d]=(0,i.useState)(!1),[x,h]=(0,i.useState)(null),m=async()=>{d(!0),h(null);try{await t.startEvalRun(s,{versionNumber:a?Number(a):void 0}),l()}catch(e){h(e instanceof Error?e.message:"Failed to start eval run")}finally{d(!1)}};return(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:(0,r.jsxs)("div",{className:"w-full max-w-md rounded-xl border border-white/10 bg-[#1c2129] p-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-white",children:"Run Evals"}),(0,r.jsx)("button",{onClick:n,className:"text-white/40 hover:text-white",children:(0,r.jsx)(V,{className:"h-5 w-5"})})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-white/70",children:"Version Number (optional)"}),(0,r.jsx)("input",{type:"number",value:a,onChange:e=>o(e.target.value),placeholder:"Leave empty for active version",className:"flex w-full rounded-lg border px-3 py-2 text-sm bg-white/5 border-white/10 text-white placeholder:text-white/40 focus-visible:outline-none focus-visible:border-indigo-500/50"})]}),x&&(0,r.jsx)("p",{className:"text-sm text-red-400",children:x}),(0,r.jsxs)("div",{className:"flex justify-end gap-3 pt-2",children:[(0,r.jsx)("button",{onClick:n,className:"px-3 py-1.5 text-sm text-white/70 hover:text-white hover:bg-white/10 rounded-lg transition-colors",children:"Cancel"}),(0,r.jsx)("button",{onClick:m,disabled:c,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-lg bg-indigo-500 text-white hover:bg-indigo-400 disabled:opacity-50 transition-colors",children:c?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(W,{className:"h-3.5 w-3.5 animate-spin"})," Starting..."]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ei,{className:"h-3.5 w-3.5"})," Start Run"]})})]})]})]})})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[929],{3929:(e,t,s)=>{let a;async function*n(e){let t=e.getReader(),s=new TextDecoder,a="",n="";try{for(;;){let{done:e,value:i}=await t.read();if(e)break;let r=(a+=s.decode(i,{stream:!0})).split("\n");for(let e of(a=r.pop()||"",r))if(e.startsWith("event: "))n=e.slice(7).trim();else if(e.startsWith("data: ")){let t=e.slice(6);try{yield{type:n,data:JSON.parse(t)}}catch(e){}}}}finally{t.releaseLock()}}s.d(t,{z5:()=>u,KU:()=>l});var i=s(1053).hp;class r extends Error{constructor(e,t){super(t),this.name="AshApiError",this.statusCode=e}}class o{headers(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t={};return e&&(t["Content-Type"]="application/json"),this.apiKey&&(t.Authorization="Bearer ".concat(this.apiKey)),t}async request(e,t,s){let a=await fetch("".concat(this.serverUrl).concat(t),{method:e,headers:this.headers(!!s),body:s?JSON.stringify(s):void 0});if(!a.ok){let e=await a.json().catch(()=>({})),t=e.message||e.error||a.statusText;throw new r(a.status,t)}return await a.json()}async deployAgent(e,t,s){let a={name:e,path:t};return(null==s?void 0:s.env)&&(a.env=s.env),(await this.request("POST","/api/agents",a)).agent}async createAgent(e,t){let s={name:e};return(null==t?void 0:t.slug)&&(s.slug=t.slug),(null==t?void 0:t.description)&&(s.description=t.description),(null==t?void 0:t.model)&&(s.model=t.model),(null==t?void 0:t.backend)&&(s.backend=t.backend),(null==t?void 0:t.systemPrompt)&&(s.systemPrompt=t.systemPrompt),(null==t?void 0:t.config)&&(s.config=t.config),(null==t?void 0:t.files)&&(s.files=t.files),(await this.request("POST","/api/agents",s)).agent}async listAgents(){return(await this.request("GET","/api/agents")).agents}async getAgent(e){return(await this.request("GET","/api/agents/".concat(e))).agent}async deleteAgent(e){await this.request("DELETE","/api/agents/".concat(e))}async updateAgent(e,t){return(await this.request("PATCH","/api/agents/".concat(e),t)).agent}async listAgentFiles(e){return this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/files"))}async getAgentFile(e,t){return this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/files/").concat(t,"?format=json"))}async createSession(e,t){let s={agent:e};return(null==t?void 0:t.credentialId)&&(s.credentialId=t.credentialId),(null==t?void 0:t.extraEnv)&&(s.extraEnv=t.extraEnv),(null==t?void 0:t.model)&&(s.model=t.model),(null==t?void 0:t.mcpServers)&&(s.mcpServers=t.mcpServers),(null==t?void 0:t.systemPrompt)!=null&&(s.systemPrompt=t.systemPrompt),(null==t?void 0:t.allowedTools)&&(s.allowedTools=t.allowedTools),(null==t?void 0:t.disallowedTools)&&(s.disallowedTools=t.disallowedTools),(null==t?void 0:t.betas)&&(s.betas=t.betas),(null==t?void 0:t.subagents)&&(s.subagents=t.subagents),(null==t?void 0:t.initialAgent)&&(s.initialAgent=t.initialAgent),(await this.request("POST","/api/sessions",s)).session}async listSessions(e){let t="string"==typeof e?{agent:e}:null!=e?e:{},s=new URLSearchParams;t.agent&&s.set("agent",t.agent),t.status&&s.set("status",t.status),t.limit&&s.set("limit",String(t.limit)),t.offset&&s.set("offset",String(t.offset));let a=s.toString();return(await this.request("GET","/api/sessions".concat(a?"?".concat(a):""))).sessions}async listSessionsWithTotal(e){let t=new URLSearchParams;(null==e?void 0:e.agent)&&t.set("agent",e.agent),(null==e?void 0:e.status)&&t.set("status",e.status),(null==e?void 0:e.limit)&&t.set("limit",String(e.limit)),(null==e?void 0:e.offset)&&t.set("offset",String(e.offset)),t.set("includeTotal","true");let s=t.toString();return this.request("GET","/api/sessions?".concat(s))}async getSession(e){return(await this.request("GET","/api/sessions/".concat(e))).session}async sendMessage(e,t,s){let a={content:t};(null==s?void 0:s.includePartialMessages)&&(a.includePartialMessages=!0),(null==s?void 0:s.model)&&(a.model=s.model),(null==s?void 0:s.maxTurns)!=null&&(a.maxTurns=s.maxTurns),(null==s?void 0:s.maxBudgetUsd)!=null&&(a.maxBudgetUsd=s.maxBudgetUsd),(null==s?void 0:s.effort)&&(a.effort=s.effort),(null==s?void 0:s.thinking)&&(a.thinking=s.thinking),(null==s?void 0:s.outputFormat)&&(a.outputFormat=s.outputFormat);let n=await fetch("".concat(this.serverUrl,"/api/sessions/").concat(e,"/messages"),{method:"POST",headers:this.headers(!0),body:JSON.stringify(a)});if(!n.ok){let e=await n.json().catch(()=>({})),t=e.message||e.error||n.statusText;throw new r(n.status,t)}return n}async *sendMessageStream(e,t,s){let a=await this.sendMessage(e,t,s);a.body&&(yield*n(a.body))}async updateSessionConfig(e,t){return(await this.request("PATCH","/api/sessions/".concat(e,"/config"),t)).session}async stopSession(e){return(await this.request("POST","/api/sessions/".concat(e,"/stop"))).session}async forkSession(e){return(await this.request("POST","/api/sessions/".concat(e,"/fork"))).session}async pauseSession(e){return(await this.request("POST","/api/sessions/".concat(e,"/pause"))).session}async resumeSession(e){return(await this.request("POST","/api/sessions/".concat(e,"/resume"))).session}async endSession(e){return(await this.request("DELETE","/api/sessions/".concat(e))).session}async exec(e,t,s){let a={command:t};return(null==s?void 0:s.timeout)&&(a.timeout=s.timeout),this.request("POST","/api/sessions/".concat(e,"/exec"),a)}async listMessages(e,t){let s=new URLSearchParams;(null==t?void 0:t.limit)&&s.set("limit",String(t.limit)),(null==t?void 0:t.afterSequence)&&s.set("after",String(t.afterSequence));let a=s.toString(),n="/api/sessions/".concat(e,"/messages").concat(a?"?".concat(a):"");return(await this.request("GET",n)).messages}async listSessionEvents(e,t){let s=new URLSearchParams;(null==t?void 0:t.limit)&&s.set("limit",String(t.limit)),(null==t?void 0:t.afterSequence)&&s.set("after",String(t.afterSequence)),(null==t?void 0:t.type)&&s.set("type",t.type);let a=s.toString(),n="/api/sessions/".concat(e,"/events").concat(a?"?".concat(a):"");return(await this.request("GET",n)).events}async getSessionLogs(e,t){let s=new URLSearchParams;(null==t?void 0:t.after)!=null&&s.set("after",String(t.after));let a=s.toString(),n="/api/sessions/".concat(e,"/logs").concat(a?"?".concat(a):"");return this.request("GET",n)}async getSessionFiles(e,t){var s;let a=new URLSearchParams;null==(s=null==t?void 0:t.includeHidden)||s||a.set("includeHidden","false");let n=a.toString();return this.request("GET","/api/sessions/".concat(e,"/files").concat(n?"?".concat(n):""))}async getSessionFile(e,t){return this.request("GET","/api/sessions/".concat(e,"/files/").concat(t,"?format=json"))}async downloadSessionFile(e,t){let s=await fetch("".concat(this.serverUrl,"/api/sessions/").concat(e,"/files/").concat(t),{headers:this.headers()});if(!s.ok){let e=await s.json().catch(()=>({})),t=e.message||e.error||s.statusText;throw new r(s.status,t)}return{buffer:i.from(await s.arrayBuffer()),mimeType:s.headers.get("Content-Type")||"application/octet-stream",source:s.headers.get("X-Ash-Source")||"unknown"}}async downloadSessionFileRaw(e,t){let s=await fetch("".concat(this.serverUrl,"/api/sessions/").concat(e,"/files/").concat(t),{headers:this.headers()});if(!s.ok){let e=await s.json().catch(()=>({})),t=e.message||e.error||s.statusText;throw new r(s.status,t)}return s}async writeSessionFiles(e,t,s){let a={files:t};return s&&(a.targetPath=s),this.request("POST","/api/sessions/".concat(e,"/files"),a)}async deleteSessionFile(e,t){return this.request("DELETE","/api/sessions/".concat(e,"/files/").concat(t))}async storeCredential(e,t,s){let a={type:e,key:t};return s&&(a.label=s),(await this.request("POST","/api/credentials",a)).credential}async storeBedrockCredential(e){let t=JSON.stringify({accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,region:e.region,...e.sessionToken&&{sessionToken:e.sessionToken}});return this.storeCredential("bedrock",t,e.label)}async listCredentials(){return(await this.request("GET","/api/credentials")).credentials}async deleteCredential(e){await this.request("DELETE","/api/credentials/".concat(e))}async uploadAttachment(e,t,s,a){let n={filename:t,content:s.toString("base64")};return(null==a?void 0:a.mimeType)&&(n.mimeType=a.mimeType),(null==a?void 0:a.messageId)&&(n.messageId=a.messageId),(await this.request("POST","/api/sessions/".concat(e,"/attachments"),n)).attachment}async listAttachments(e){return(await this.request("GET","/api/sessions/".concat(e,"/attachments"))).attachments}async downloadAttachment(e){let t=await fetch("".concat(this.serverUrl,"/api/attachments/").concat(e),{headers:this.headers()});if(!t.ok){let e=await t.json().catch(()=>({})),s=e.message||e.error||t.statusText;throw new r(t.status,s)}return i.from(await t.arrayBuffer())}async deleteAttachment(e){await this.request("DELETE","/api/attachments/".concat(e))}async downloadWorkspace(e){let t=await fetch("".concat(this.serverUrl,"/api/sessions/").concat(e,"/workspace"),{headers:this.headers()});if(!t.ok){let e=await t.json().catch(()=>({})),s=e.message||e.error||t.statusText;throw new r(t.status,s)}return i.from(await t.arrayBuffer())}async uploadWorkspace(e,t){await this.request("POST","/api/sessions/".concat(e,"/workspace"),{bundle:t.toString("base64")})}async enqueue(e,t,s){let a={agentName:e,prompt:t};return(null==s?void 0:s.sessionId)&&(a.sessionId=s.sessionId),(null==s?void 0:s.priority)!==void 0&&(a.priority=s.priority),(null==s?void 0:s.maxRetries)!==void 0&&(a.maxRetries=s.maxRetries),(await this.request("POST","/api/queue",a)).item}async listQueueItems(e){let t=new URLSearchParams;(null==e?void 0:e.status)&&t.set("status",e.status),(null==e?void 0:e.limit)&&t.set("limit",String(e.limit));let s=t.toString();return(await this.request("GET","/api/queue".concat(s?"?".concat(s):""))).items}async getQueueItem(e){return(await this.request("GET","/api/queue/".concat(e))).item}async cancelQueueItem(e){return(await this.request("DELETE","/api/queue/".concat(e))).item}async getQueueStats(){return(await this.request("GET","/api/queue/stats")).stats}async listUsageEvents(e){let t=new URLSearchParams;(null==e?void 0:e.sessionId)&&t.set("sessionId",e.sessionId),(null==e?void 0:e.agentName)&&t.set("agentName",e.agentName),(null==e?void 0:e.limit)&&t.set("limit",String(e.limit));let s=t.toString();return(await this.request("GET","/api/usage".concat(s?"?".concat(s):""))).events}async getUsageStats(e){let t=new URLSearchParams;(null==e?void 0:e.sessionId)&&t.set("sessionId",e.sessionId),(null==e?void 0:e.agentName)&&t.set("agentName",e.agentName);let s=t.toString();return(await this.request("GET","/api/usage/stats".concat(s?"?".concat(s):""))).stats}async listFiles(){return(await this.request("GET","/api/files")).files}async uploadFile(e){return(await this.request("POST","/api/files",e)).file}async getFileUrl(e){return(await this.request("GET","/api/files/".concat(e,"/url"))).url}async deleteFile(e){await this.request("DELETE","/api/files/".concat(e))}async health(){return this.request("GET","/health")}async listAgentVersions(e){return(await this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/versions"))).versions}async createAgentVersion(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("POST","/api/agents/".concat(encodeURIComponent(e),"/versions"),t)}async getAgentVersion(e,t){return this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/versions/").concat(t))}async updateAgentVersion(e,t,s){return this.request("PATCH","/api/agents/".concat(encodeURIComponent(e),"/versions/").concat(t),s)}async deleteAgentVersion(e,t){await this.request("DELETE","/api/agents/".concat(encodeURIComponent(e),"/versions/").concat(t))}async activateAgentVersion(e,t){await this.request("POST","/api/agents/".concat(encodeURIComponent(e),"/versions/").concat(t,"/activate"))}async uploadAgentFiles(e,t){return this.request("POST","/api/agents/".concat(encodeURIComponent(e),"/files"),{files:t})}async deleteAgentFile(e,t){return this.request("DELETE","/api/agents/".concat(encodeURIComponent(e),"/files/").concat(t))}async listEvalCases(e,t){let s=new URLSearchParams;(null==t?void 0:t.category)&&s.set("category",t.category),(null==t?void 0:t.isActive)!==void 0&&s.set("isActive",String(t.isActive));let a=s.toString();return(await this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/eval-cases").concat(a?"?"+a:""))).cases}async createEvalCase(e,t){return this.request("POST","/api/agents/".concat(encodeURIComponent(e),"/eval-cases"),t)}async getEvalCase(e,t){return this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/eval-cases/").concat(t))}async updateEvalCase(e,t,s){return this.request("PATCH","/api/agents/".concat(encodeURIComponent(e),"/eval-cases/").concat(t),s)}async deleteEvalCase(e,t){await this.request("DELETE","/api/agents/".concat(encodeURIComponent(e),"/eval-cases/").concat(t))}async importEvalCases(e,t){return this.request("POST","/api/agents/".concat(encodeURIComponent(e),"/eval-cases/import"),{cases:t})}async exportEvalCases(e){return(await this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/eval-cases/export"))).cases}async startEvalRun(e,t){return this.request("POST","/api/agents/".concat(encodeURIComponent(e),"/eval-runs"),t||{})}async listEvalRuns(e){return(await this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/eval-runs"))).runs}async getEvalRun(e,t){return this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/eval-runs/").concat(t))}async getEvalRunResults(e,t){return(await this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/eval-runs/").concat(t,"/results"))).results}async compareEvalRuns(e,t,s){return this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/eval-runs/compare?runA=").concat(t,"&runB=").concat(s))}constructor(e){this.serverUrl=e.serverUrl.replace(/\/$/,""),this.apiKey=e.apiKey}}parseInt(s(9819).env.ASH_SANDBOX_MEMORY_MB||"",10),s(9819);let c=null;function l(){if(!c){var e,t;c=new o({serverUrl:(null==(e=window.__ASH_CONFIG__)?void 0:e.serverUrl)||window.location.origin,apiKey:a=null==(t=window.__ASH_CONFIG__)?void 0:t.apiKey})}return c}function u(){return l(),a?{Authorization:"Bearer ".concat(a)}:{}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[929],{3929:(e,t,s)=>{let a;async function*n(e){let t=e.getReader(),s=new TextDecoder,a="",n="";try{for(;;){let{done:e,value:i}=await t.read();if(e)break;let o=(a+=s.decode(i,{stream:!0})).split("\n");for(let e of(a=o.pop()||"",o))if(e.startsWith("event: "))n=e.slice(7).trim();else if(e.startsWith("data: ")){let t=e.slice(6);try{yield{type:n,data:JSON.parse(t)}}catch(e){}}}}finally{t.releaseLock()}}s.d(t,{z5:()=>u,KU:()=>l});var i=s(1053).hp;class o extends Error{constructor(e,t){super(t),this.name="AshApiError",this.statusCode=e}}class r{headers(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t={};return e&&(t["Content-Type"]="application/json"),this.apiKey&&(t.Authorization="Bearer ".concat(this.apiKey)),t}async request(e,t,s){let a=await fetch("".concat(this.serverUrl).concat(t),{method:e,headers:this.headers(!!s),body:s?JSON.stringify(s):void 0});if(!a.ok){let e=await a.json().catch(()=>({})),t=e.message||e.error||a.statusText;throw new o(a.status,t)}return await a.json()}async deployAgent(e,t,s){let a={name:e,path:t};return(null==s?void 0:s.env)&&(a.env=s.env),(await this.request("POST","/api/agents",a)).agent}async createAgent(e,t){let s={name:e};return(null==t?void 0:t.slug)&&(s.slug=t.slug),(null==t?void 0:t.description)&&(s.description=t.description),(null==t?void 0:t.model)&&(s.model=t.model),(null==t?void 0:t.backend)&&(s.backend=t.backend),(null==t?void 0:t.systemPrompt)&&(s.systemPrompt=t.systemPrompt),(null==t?void 0:t.config)&&(s.config=t.config),(null==t?void 0:t.files)&&(s.files=t.files),(await this.request("POST","/api/agents",s)).agent}async listAgents(){return(await this.request("GET","/api/agents")).agents}async getAgent(e){return(await this.request("GET","/api/agents/".concat(e))).agent}async deleteAgent(e){await this.request("DELETE","/api/agents/".concat(e))}async updateAgent(e,t){return(await this.request("PATCH","/api/agents/".concat(e),t)).agent}async listAgentFiles(e){return this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/files"))}async getAgentFile(e,t){return this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/files/").concat(t,"?format=json"))}async createSession(e,t){let s={agent:e};return(null==t?void 0:t.credentialId)&&(s.credentialId=t.credentialId),(null==t?void 0:t.extraEnv)&&(s.extraEnv=t.extraEnv),(null==t?void 0:t.model)&&(s.model=t.model),(null==t?void 0:t.mcpServers)&&(s.mcpServers=t.mcpServers),(null==t?void 0:t.systemPrompt)!=null&&(s.systemPrompt=t.systemPrompt),(null==t?void 0:t.allowedTools)&&(s.allowedTools=t.allowedTools),(null==t?void 0:t.disallowedTools)&&(s.disallowedTools=t.disallowedTools),(null==t?void 0:t.betas)&&(s.betas=t.betas),(null==t?void 0:t.subagents)&&(s.subagents=t.subagents),(null==t?void 0:t.initialAgent)&&(s.initialAgent=t.initialAgent),(await this.request("POST","/api/sessions",s)).session}async listSessions(e){let t="string"==typeof e?{agent:e}:null!=e?e:{},s=new URLSearchParams;t.agent&&s.set("agent",t.agent),t.status&&s.set("status",t.status),t.limit&&s.set("limit",String(t.limit)),t.offset&&s.set("offset",String(t.offset));let a=s.toString();return(await this.request("GET","/api/sessions".concat(a?"?".concat(a):""))).sessions}async listSessionsWithTotal(e){let t=new URLSearchParams;(null==e?void 0:e.agent)&&t.set("agent",e.agent),(null==e?void 0:e.status)&&t.set("status",e.status),(null==e?void 0:e.limit)&&t.set("limit",String(e.limit)),(null==e?void 0:e.offset)&&t.set("offset",String(e.offset)),t.set("includeTotal","true");let s=t.toString();return this.request("GET","/api/sessions?".concat(s))}async getSession(e){return(await this.request("GET","/api/sessions/".concat(e))).session}async sendMessage(e,t,s){let a={content:t};(null==s?void 0:s.includePartialMessages)&&(a.includePartialMessages=!0),(null==s?void 0:s.model)&&(a.model=s.model),(null==s?void 0:s.maxTurns)!=null&&(a.maxTurns=s.maxTurns),(null==s?void 0:s.maxBudgetUsd)!=null&&(a.maxBudgetUsd=s.maxBudgetUsd),(null==s?void 0:s.effort)&&(a.effort=s.effort),(null==s?void 0:s.thinking)&&(a.thinking=s.thinking),(null==s?void 0:s.outputFormat)&&(a.outputFormat=s.outputFormat);let n=await fetch("".concat(this.serverUrl,"/api/sessions/").concat(e,"/messages"),{method:"POST",headers:this.headers(!0),body:JSON.stringify(a)});if(!n.ok){let e=await n.json().catch(()=>({})),t=e.message||e.error||n.statusText;throw new o(n.status,t)}return n}async *sendMessageStream(e,t,s){let a=await this.sendMessage(e,t,s);a.body&&(yield*n(a.body))}async updateSessionConfig(e,t){return(await this.request("PATCH","/api/sessions/".concat(e,"/config"),t)).session}async stopSession(e){return(await this.request("POST","/api/sessions/".concat(e,"/stop"))).session}async forkSession(e){return(await this.request("POST","/api/sessions/".concat(e,"/fork"))).session}async pauseSession(e){return(await this.request("POST","/api/sessions/".concat(e,"/pause"))).session}async resumeSession(e){return(await this.request("POST","/api/sessions/".concat(e,"/resume"))).session}async endSession(e){return(await this.request("DELETE","/api/sessions/".concat(e))).session}async exec(e,t,s){let a={command:t};return(null==s?void 0:s.timeout)&&(a.timeout=s.timeout),this.request("POST","/api/sessions/".concat(e,"/exec"),a)}async listMessages(e,t){let s=new URLSearchParams;(null==t?void 0:t.limit)&&s.set("limit",String(t.limit)),(null==t?void 0:t.afterSequence)&&s.set("after",String(t.afterSequence));let a=s.toString(),n="/api/sessions/".concat(e,"/messages").concat(a?"?".concat(a):"");return(await this.request("GET",n)).messages}async listSessionEvents(e,t){let s=new URLSearchParams;(null==t?void 0:t.limit)&&s.set("limit",String(t.limit)),(null==t?void 0:t.afterSequence)&&s.set("after",String(t.afterSequence)),(null==t?void 0:t.type)&&s.set("type",t.type);let a=s.toString(),n="/api/sessions/".concat(e,"/events").concat(a?"?".concat(a):"");return(await this.request("GET",n)).events}async getSessionLogs(e,t){let s=new URLSearchParams;(null==t?void 0:t.after)!=null&&s.set("after",String(t.after));let a=s.toString(),n="/api/sessions/".concat(e,"/logs").concat(a?"?".concat(a):"");return this.request("GET",n)}async getSessionFiles(e,t){var s;let a=new URLSearchParams;null==(s=null==t?void 0:t.includeHidden)||s||a.set("includeHidden","false");let n=a.toString();return this.request("GET","/api/sessions/".concat(e,"/files").concat(n?"?".concat(n):""))}async getSessionFile(e,t){return this.request("GET","/api/sessions/".concat(e,"/files/").concat(t,"?format=json"))}async downloadSessionFile(e,t){let s=await fetch("".concat(this.serverUrl,"/api/sessions/").concat(e,"/files/").concat(t),{headers:this.headers()});if(!s.ok){let e=await s.json().catch(()=>({})),t=e.message||e.error||s.statusText;throw new o(s.status,t)}return{buffer:i.from(await s.arrayBuffer()),mimeType:s.headers.get("Content-Type")||"application/octet-stream",source:s.headers.get("X-Ash-Source")||"unknown"}}async downloadSessionFileRaw(e,t){let s=await fetch("".concat(this.serverUrl,"/api/sessions/").concat(e,"/files/").concat(t),{headers:this.headers()});if(!s.ok){let e=await s.json().catch(()=>({})),t=e.message||e.error||s.statusText;throw new o(s.status,t)}return s}async writeSessionFiles(e,t,s){let a={files:t};return s&&(a.targetPath=s),this.request("POST","/api/sessions/".concat(e,"/files"),a)}async deleteSessionFile(e,t){return this.request("DELETE","/api/sessions/".concat(e,"/files/").concat(t))}async storeCredential(e,t,s){let a={type:e,key:t};return s&&(a.label=s),(await this.request("POST","/api/credentials",a)).credential}async storeBedrockCredential(e){let t=JSON.stringify({accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,region:e.region,...e.sessionToken&&{sessionToken:e.sessionToken}});return this.storeCredential("bedrock",t,e.label)}async listCredentials(){return(await this.request("GET","/api/credentials")).credentials}async deleteCredential(e){await this.request("DELETE","/api/credentials/".concat(e))}async uploadAttachment(e,t,s,a){let n={filename:t,content:s.toString("base64")};return(null==a?void 0:a.mimeType)&&(n.mimeType=a.mimeType),(null==a?void 0:a.messageId)&&(n.messageId=a.messageId),(await this.request("POST","/api/sessions/".concat(e,"/attachments"),n)).attachment}async listAttachments(e){return(await this.request("GET","/api/sessions/".concat(e,"/attachments"))).attachments}async downloadAttachment(e){let t=await fetch("".concat(this.serverUrl,"/api/attachments/").concat(e),{headers:this.headers()});if(!t.ok){let e=await t.json().catch(()=>({})),s=e.message||e.error||t.statusText;throw new o(t.status,s)}return i.from(await t.arrayBuffer())}async deleteAttachment(e){await this.request("DELETE","/api/attachments/".concat(e))}async downloadWorkspace(e){let t=await fetch("".concat(this.serverUrl,"/api/sessions/").concat(e,"/workspace"),{headers:this.headers()});if(!t.ok){let e=await t.json().catch(()=>({})),s=e.message||e.error||t.statusText;throw new o(t.status,s)}return i.from(await t.arrayBuffer())}async uploadWorkspace(e,t){await this.request("POST","/api/sessions/".concat(e,"/workspace"),{bundle:t.toString("base64")})}async enqueue(e,t,s){let a={agentName:e,prompt:t};return(null==s?void 0:s.sessionId)&&(a.sessionId=s.sessionId),(null==s?void 0:s.priority)!==void 0&&(a.priority=s.priority),(null==s?void 0:s.maxRetries)!==void 0&&(a.maxRetries=s.maxRetries),(await this.request("POST","/api/queue",a)).item}async listQueueItems(e){let t=new URLSearchParams;(null==e?void 0:e.status)&&t.set("status",e.status),(null==e?void 0:e.limit)&&t.set("limit",String(e.limit));let s=t.toString();return(await this.request("GET","/api/queue".concat(s?"?".concat(s):""))).items}async getQueueItem(e){return(await this.request("GET","/api/queue/".concat(e))).item}async cancelQueueItem(e){return(await this.request("DELETE","/api/queue/".concat(e))).item}async getQueueStats(){return(await this.request("GET","/api/queue/stats")).stats}async listUsageEvents(e){let t=new URLSearchParams;(null==e?void 0:e.sessionId)&&t.set("sessionId",e.sessionId),(null==e?void 0:e.agentName)&&t.set("agentName",e.agentName),(null==e?void 0:e.limit)&&t.set("limit",String(e.limit));let s=t.toString();return(await this.request("GET","/api/usage".concat(s?"?".concat(s):""))).events}async getUsageStats(e){let t=new URLSearchParams;(null==e?void 0:e.sessionId)&&t.set("sessionId",e.sessionId),(null==e?void 0:e.agentName)&&t.set("agentName",e.agentName);let s=t.toString();return(await this.request("GET","/api/usage/stats".concat(s?"?".concat(s):""))).stats}async listFiles(){return(await this.request("GET","/api/files")).files}async uploadFile(e){return(await this.request("POST","/api/files",e)).file}async getFileUrl(e){return(await this.request("GET","/api/files/".concat(e,"/url"))).url}async deleteFile(e){await this.request("DELETE","/api/files/".concat(e))}async health(){return this.request("GET","/health")}async listAgentVersions(e){return(await this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/versions"))).versions}async createAgentVersion(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("POST","/api/agents/".concat(encodeURIComponent(e),"/versions"),t)}async getAgentVersion(e,t){return this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/versions/").concat(t))}async updateAgentVersion(e,t,s){return this.request("PATCH","/api/agents/".concat(encodeURIComponent(e),"/versions/").concat(t),s)}async deleteAgentVersion(e,t){await this.request("DELETE","/api/agents/".concat(encodeURIComponent(e),"/versions/").concat(t))}async activateAgentVersion(e,t){await this.request("POST","/api/agents/".concat(encodeURIComponent(e),"/versions/").concat(t,"/activate"))}async uploadAgentFiles(e,t){return this.request("POST","/api/agents/".concat(encodeURIComponent(e),"/files"),{files:t})}async deleteAgentFile(e,t){return this.request("DELETE","/api/agents/".concat(encodeURIComponent(e),"/files/").concat(t))}async listEvalCases(e,t){let s=new URLSearchParams;(null==t?void 0:t.category)&&s.set("category",t.category),(null==t?void 0:t.isActive)!==void 0&&s.set("isActive",String(t.isActive));let a=s.toString();return(await this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/eval-cases").concat(a?"?"+a:""))).cases}async createEvalCase(e,t){return this.request("POST","/api/agents/".concat(encodeURIComponent(e),"/eval-cases"),t)}async getEvalCase(e,t){return this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/eval-cases/").concat(t))}async updateEvalCase(e,t,s){return this.request("PATCH","/api/agents/".concat(encodeURIComponent(e),"/eval-cases/").concat(t),s)}async deleteEvalCase(e,t){await this.request("DELETE","/api/agents/".concat(encodeURIComponent(e),"/eval-cases/").concat(t))}async importEvalCases(e,t){return this.request("POST","/api/agents/".concat(encodeURIComponent(e),"/eval-cases/import"),{cases:t})}async exportEvalCases(e){return(await this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/eval-cases/export"))).cases}async startEvalRun(e,t){return this.request("POST","/api/agents/".concat(encodeURIComponent(e),"/eval-runs"),t||{})}async listEvalRuns(e){return(await this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/eval-runs"))).runs}async getEvalRun(e,t){return this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/eval-runs/").concat(t))}async getEvalRunResults(e,t){return(await this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/eval-runs/").concat(t,"/results"))).results}async compareEvalRuns(e,t,s){return this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/eval-runs/compare?runA=").concat(t,"&runB=").concat(s))}async scoreEvalResult(e,t,s){return(await this.request("PATCH","/api/agents/".concat(encodeURIComponent(e),"/eval-results/").concat(t),s)).result}async scoreEvalRun(e,t,s){return this.request("POST","/api/agents/".concat(encodeURIComponent(e),"/eval-runs/").concat(t,"/score"),s)}async getAgentConfig(e){return(await this.request("GET","/api/agents/".concat(encodeURIComponent(e),"/config"))).config}async updateAgentConfig(e,t){return(await this.request("PATCH","/api/agents/".concat(encodeURIComponent(e),"/config"),t)).config}async getAnalytics(e){let t=new URLSearchParams;(null==e?void 0:e.after)&&t.set("after",e.after),(null==e?void 0:e.before)&&t.set("before",e.before);let s=t.toString();return this.request("GET","/api/analytics".concat(s?"?"+s:""))}constructor(e){this.serverUrl=e.serverUrl.replace(/\/$/,""),this.apiKey=e.apiKey}}parseInt(s(9819).env.ASH_SANDBOX_MEMORY_MB||"",10),s(9819);let c=null;function l(){if(!c){var e,t;c=new r({serverUrl:(null==(e=window.__ASH_CONFIG__)?void 0:e.serverUrl)||window.location.origin,apiKey:a=null==(t=window.__ASH_CONFIG__)?void 0:t.apiKey})}return c}function u(){return l(),a?{Authorization:"Bearer ".concat(a)}:{}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[916],{191:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(403)._(n(919));function a(e,t){var n;let a={};"function"==typeof e&&(a.loader=e);let o={...a,...t};return(0,r.default)({...o,modules:null==(n=o.loadableGenerated)?void 0:n.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},345:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,n(8919).createAsyncLocalStorage)()},919:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let r=n(534),a=n(4166),o=n(5452);function l(e){return{default:e&&"default"in e?e.default:e}}n(1649);let i={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},s=function(e){let t={...i,...e},n=(0,a.lazy)(()=>t.loader().then(l)),s=t.loading;function c(e){let l=s?(0,r.jsx)(s,{isLoading:!0,pastDelay:!0,error:null}):null,i=!t.ssr||!!t.loading,c=i?a.Suspense:a.Fragment,u=t.ssr?(0,r.jsxs)(r.Fragment,{children:[null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(c,{...i?{fallback:l}:{},children:u})}return c.displayName="LoadableComponent",c}},1649:(e,t,n)=>{"use strict";function r(e){let{moduleIds:t}=e;return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return r}}),n(534),n(7763),n(6890),n(2959)},1804:(e,t,n)=>{"use strict";n.d(t,{Ct:()=>c,ZV:()=>i,a3:()=>s,cn:()=>o,fw:()=>l});var r=n(6862),a=n(3690);function o(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,a.QP)((0,r.$)(t))}function l(e){let t=Date.now(),n=Math.floor((t-new Date(e).getTime())/1e3);if(n<60)return"".concat(n,"s ago");let r=Math.floor(n/60);if(r<60)return"".concat(r,"m ago");let a=Math.floor(r/60);if(a<24)return"".concat(a,"h ago");let o=Math.floor(a/24);return o<30?"".concat(o,"d ago"):new Date(e).toLocaleDateString()}function i(e){return e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"K"):e.toString()}function s(e){if(e<60)return"".concat(e.toFixed(1),"s");let t=Math.floor(e/60);if(t<60)return"".concat(t,"m ").concat(Math.floor(e%60),"s");let n=Math.floor(t/60);return"".concat(n,"h ").concat(t%60,"m")}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return e.length>t?e.slice(0,t):e}},2268:(e,t,n)=>{Promise.resolve().then(n.bind(n,4300))},4275:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(8154).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},4300:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>m});var r=n(534),a=n(4166),o=n(9197),l=n(8968),i=n.n(l),s=n(4946),c=n(3929),u=n(7964),d=n(4275);let f=(0,s.default)(()=>n.e(447).then(n.bind(n,6447)).then(e=>({default:e.AgentConfigEditor})),{loadableGenerated:{webpack:()=>[null]},ssr:!1,loading:()=>(0,r.jsx)(u.X,{height:200})});function h(){let e=(0,o.useSearchParams)().get("name");return e?(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)(i(),{href:"/agents/detail?name=".concat(encodeURIComponent(e)),className:"inline-flex items-center gap-1.5 text-sm text-white/50 hover:text-white transition-colors",children:[(0,r.jsx)(d.A,{className:"h-4 w-4"}),"Back to ",e]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-white",children:"Configuration"}),(0,r.jsxs)("p",{className:"mt-1 text-sm text-white/50",children:["Edit config for ",(0,r.jsx)("span",{className:"text-white/70",children:e})]})]}),(0,r.jsx)(f,{client:(0,c.KU)(),agentName:e})]}):(0,r.jsxs)("div",{className:"text-center py-16",children:[(0,r.jsx)("p",{className:"text-white/50",children:"No agent name specified."}),(0,r.jsx)(i(),{href:"/agents",className:"text-indigo-400 hover:text-indigo-300 text-sm mt-2 inline-block",children:"Back to agents"})]})}function m(){return(0,r.jsx)(a.Suspense,{fallback:(0,r.jsx)(u.X,{height:200}),children:(0,r.jsx)(h,{})})}},4946:(e,t,n)=>{"use strict";n.d(t,{default:()=>a.a});var r=n(191),a=n.n(r)},5452:(e,t,n)=>{"use strict";function r(e){let{reason:t,children:n}=e;return n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return r}}),n(8560)},6890:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=n(345)},7964:(e,t,n)=>{"use strict";n.d(t,{X:()=>o});var r=n(534),a=n(1804);function o(e){let{width:t="100%",height:n=100,className:o}=e;return(0,r.jsx)("div",{className:(0,a.cn)("rounded-xl","bg-gradient-to-r from-white/5 via-white/10 to-white/5","bg-[length:200%_100%]","animate-[shimmer_1.5s_ease-in-out_infinite]",o),style:{width:"number"==typeof t?"".concat(t,"px"):t,height:n}})}},8919:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{bindSnapshot:function(){return l},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return i}});let n=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class r{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}static bind(e){return e}}let a="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return a?new a:new r}function l(e){return a?a.bind(e):r.bind(e)}function i(){return a?a.snapshot():function(e,...t){return e(...t)}}},9197:(e,t,n)=>{"use strict";var r=n(4841);n.o(r,"usePathname")&&n.d(t,{usePathname:function(){return r.usePathname}}),n.o(r,"useSearchParams")&&n.d(t,{useSearchParams:function(){return r.useSearchParams}})}},e=>{e.O(0,[513,53,839,929,705,522,358],()=>e(e.s=2268)),_N_E=e.O()}]);
|