@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.
Files changed (84) hide show
  1. package/app/agents/config/page.tsx +59 -0
  2. package/app/agents/detail/page.tsx +8 -1
  3. package/app/agents/evals/page.tsx +14 -403
  4. package/app/agents/knowledge/page.tsx +14 -157
  5. package/app/agents/page.tsx +34 -1
  6. package/app/agents/versions/page.tsx +14 -235
  7. package/app/sessions/page.tsx +51 -1
  8. package/out/404/index.html +1 -1
  9. package/out/404.html +1 -1
  10. package/out/_next/static/7bfIRYNSIrLnufuHDu6SP/_buildManifest.js +1 -0
  11. package/out/_next/static/chunks/447.ff2905689aee4ecc.js +1 -0
  12. package/out/_next/static/chunks/{929-b631fe082fe4e852.js → 929-f69b424a1300c015.js} +1 -1
  13. package/out/_next/static/chunks/app/agents/config/page-bd4b1aa9c56ac3bf.js +1 -0
  14. package/out/_next/static/chunks/app/agents/detail/page-7ddf96bb1bf30c84.js +1 -0
  15. package/out/_next/static/chunks/app/agents/eval-run/page-eb21414673ee3a61.js +1 -0
  16. package/out/_next/static/chunks/app/agents/eval-runs/page-4737a360beffdd17.js +1 -0
  17. package/out/_next/static/chunks/app/agents/evals/page-e764fd7f7c4e7dd0.js +1 -0
  18. package/out/_next/static/chunks/app/agents/knowledge/page-825e40e50aeca7b4.js +1 -0
  19. package/out/_next/static/chunks/app/agents/page-c70b7f8a4639d430.js +1 -0
  20. package/out/_next/static/chunks/app/agents/versions/page-16851d0f7e5c442c.js +1 -0
  21. package/out/_next/static/chunks/app/analytics/page-a1d93f279dc37c76.js +1 -0
  22. package/out/_next/static/chunks/app/layout-ccc59eb27dd73234.js +1 -0
  23. package/out/_next/static/chunks/app/logs/page-a47c75fb5c10da47.js +1 -0
  24. package/out/_next/static/chunks/app/page-8ce5c070587b5731.js +1 -0
  25. package/out/_next/static/chunks/app/playground/page-0fe012a6d6f00326.js +1 -0
  26. package/out/_next/static/chunks/app/queue/page-8413b5c0878aa6eb.js +1 -0
  27. package/out/_next/static/chunks/app/sessions/page-aac6f065bbb5b2ea.js +1 -0
  28. package/out/_next/static/chunks/app/settings/credentials/page-9ab78fa32e44448a.js +1 -0
  29. package/out/_next/static/chunks/{webpack-a50a78a04aed446d.js → webpack-2608afc863921e98.js} +1 -1
  30. package/out/_next/static/css/2c57b4d6ae47f2bd.css +1 -0
  31. package/out/agents/config/index.html +1 -0
  32. package/out/agents/config/index.txt +22 -0
  33. package/out/agents/detail/index.html +1 -1
  34. package/out/agents/detail/index.txt +6 -6
  35. package/out/agents/eval-compare/index.html +1 -1
  36. package/out/agents/eval-compare/index.txt +6 -6
  37. package/out/agents/eval-run/index.html +1 -1
  38. package/out/agents/eval-run/index.txt +6 -6
  39. package/out/agents/eval-runs/index.html +1 -1
  40. package/out/agents/eval-runs/index.txt +6 -6
  41. package/out/agents/evals/index.html +1 -1
  42. package/out/agents/evals/index.txt +6 -6
  43. package/out/agents/index.html +1 -1
  44. package/out/agents/index.txt +6 -6
  45. package/out/agents/knowledge/index.html +1 -1
  46. package/out/agents/knowledge/index.txt +6 -6
  47. package/out/agents/versions/index.html +1 -1
  48. package/out/agents/versions/index.txt +6 -6
  49. package/out/analytics/index.html +1 -1
  50. package/out/analytics/index.txt +6 -6
  51. package/out/index.html +1 -1
  52. package/out/index.txt +6 -6
  53. package/out/logs/index.html +1 -1
  54. package/out/logs/index.txt +6 -6
  55. package/out/playground/index.html +1 -1
  56. package/out/playground/index.txt +6 -6
  57. package/out/queue/index.html +1 -1
  58. package/out/queue/index.txt +6 -6
  59. package/out/sessions/index.html +1 -1
  60. package/out/sessions/index.txt +6 -6
  61. package/out/settings/api-keys/index.html +1 -1
  62. package/out/settings/api-keys/index.txt +6 -6
  63. package/out/settings/credentials/index.html +1 -1
  64. package/out/settings/credentials/index.txt +6 -6
  65. package/package.json +4 -4
  66. package/out/_next/static/chunks/447.6d3368efa2d996b0.js +0 -1
  67. package/out/_next/static/chunks/app/agents/detail/page-7427483b9c74ad63.js +0 -1
  68. package/out/_next/static/chunks/app/agents/eval-run/page-a38dac74d1b3787d.js +0 -1
  69. package/out/_next/static/chunks/app/agents/eval-runs/page-af2fb33c0fce7934.js +0 -1
  70. package/out/_next/static/chunks/app/agents/evals/page-6bdc4b839a7a8eda.js +0 -1
  71. package/out/_next/static/chunks/app/agents/knowledge/page-0e02b14bfa2a6d04.js +0 -1
  72. package/out/_next/static/chunks/app/agents/page-99f179eb7c41ebd4.js +0 -1
  73. package/out/_next/static/chunks/app/agents/versions/page-c482d9bad8f35df6.js +0 -1
  74. package/out/_next/static/chunks/app/analytics/page-ca5d8c60e62118ed.js +0 -1
  75. package/out/_next/static/chunks/app/layout-b06d1caafc026d0c.js +0 -1
  76. package/out/_next/static/chunks/app/logs/page-1a7df17a605f36d3.js +0 -1
  77. package/out/_next/static/chunks/app/page-9e02cb0e8897ab5d.js +0 -1
  78. package/out/_next/static/chunks/app/playground/page-cb17c2ffaeb31b4e.js +0 -1
  79. package/out/_next/static/chunks/app/queue/page-6013b93817822c75.js +0 -1
  80. package/out/_next/static/chunks/app/sessions/page-add67d96ab66b690.js +0 -1
  81. package/out/_next/static/chunks/app/settings/credentials/page-ffe97ffb2f60229d.js +0 -1
  82. package/out/_next/static/css/ab505eeeff3f7df5.css +0 -1
  83. package/out/_next/static/sXYgh3eUKXRKt1T_1T3tk/_buildManifest.js +0 -1
  84. /package/out/_next/static/{sXYgh3eUKXRKt1T_1T3tk → 7bfIRYNSIrLnufuHDu6SP}/_ssgManifest.js +0 -0
@@ -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><script src="/dashboard/_next/static/chunks/app/settings/api-keys/page-61050d36db9bf298.js" async=""></script><link rel="preload" href="/dashboard/config.js" as="script"/><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-indigo-400" 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 class="space-y-6"><div><h1 class="text-2xl font-bold text-white">API Keys</h1><p class="mt-1 text-sm text-white/50">Create API keys to authenticate with the Ash server</p></div><div class="rounded-2xl border border-white/10 bg-[#1c2129] transition-all duration-200"><div class="p-4 sm:p-6"><div class="flex gap-3"><div class="space-y-1.5"><input class="flex h-9 w-full rounded-xl border px-3 py-1 text-sm transition-all duration-200 bg-white/5 border-white/10 text-white placeholder:text-white/40 focus-visible:outline-none focus-visible:border-indigo-500/50 focus-visible:bg-white/10 disabled:cursor-not-allowed disabled:opacity-50 flex-1" placeholder="Key name (e.g. production)" value=""/></div><button class="inline-flex items-center justify-center transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500/50 disabled:pointer-events-none disabled:opacity-50 bg-indigo-500 text-white font-medium hover:bg-indigo-400 h-9 px-4 text-sm rounded-xl"><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-plus h-4 w-4 mr-2"><path d="M5 12h14"></path><path d="M12 5v14"></path></svg>Create Key</button></div></div></div><div class="rounded-2xl border border-white/10 bg-[#1c2129] transition-all duration-200"><div class="flex flex-col space-y-1.5 px-4 pt-4 pb-0 sm:px-6 sm:pt-6 sm:pb-0"><h3 class="text-lg font-semibold leading-none tracking-tight text-white">Getting Started</h3></div><div class="p-4 sm:p-6"><div class="rounded-lg bg-black/30 p-4 font-mono text-sm text-white/80 space-y-1"><div class="text-white/40"># Set your API key</div><div>export ASH_API_KEY=ash_sk_...</div><div class="text-white/40 mt-3"># Deploy an agent</div><div>ash deploy ./my-agent --name my-agent</div></div></div></div><div class="rounded-2xl border border-white/10 bg-[#1c2129] transition-all duration-200"><div class="flex flex-col space-y-1.5 px-4 pt-4 pb-0 sm:px-6 sm:pt-6 sm:pb-0"><h3 class="text-lg font-semibold leading-none tracking-tight text-white">Active Keys</h3></div><div class="sm:p-6 p-0"><div class="p-4 space-y-2"><div class="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]" style="width:100%;height:40px"></div><div class="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]" style="width:100%;height:40px"></div><div class="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]" style="width:100%;height:40px"></div></div></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[4636,[],\"ClientPageRoot\"]\n8:I[9336,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"929\",\"static/chunks/929-b631fe082fe4e852.js\",\"648\",\"static/chunks/app/settings/api-keys/page-61050d36db9bf298.js\"],\"default\"]\nb:I[1464,[],\"OutletBoundary\"]\nd:I[6673,[],\"AsyncMetadataOutlet\"]\nf:I[1464,[],\"ViewportBoundary\"]\n11:I[1464,[],\"MetadataBoundary\"]\n12:\"$Sreact.suspense\"\n14: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\":[\"\",\"settings\",\"api-keys\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"settings\",{\"children\":[\"api-keys\",{\"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\":[[[\"$\",\"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.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]}]}]]}]]}],{\"children\":[\"settings\",[\"$\",\"$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\":[\"api-keys\",[\"$\",\"$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\":[[\"$\",\"$L7\",null,{\"Component\":\"$8\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@9\",\"$@a\"]}],null,[\"$\",\"$Lb\",null,{\"children\":[\"$Lc\",[\"$\",\"$Ld\",null,{\"promise\":\"$@e\"}]]}]]}],{},null,false]},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$Lf\",null,{\"children\":\"$L10\"}],null],[\"$\",\"$L11\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$12\",null,{\"fallback\":null,\"children\":\"$L13\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$14\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:{}\na:\"$0:f:0:1:2:children:2:children:2:children:1:props:children:0:props:params\"\n"])</script><script>self.__next_f.push([1,"10:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\nc:null\n"])</script><script>self.__next_f.push([1,"e:{\"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,"13:\"$e: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><script src="/dashboard/_next/static/chunks/app/settings/api-keys/page-61050d36db9bf298.js" async=""></script><link rel="preload" href="/dashboard/config.js" as="script"/><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-indigo-400" 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 class="space-y-6"><div><h1 class="text-2xl font-bold text-white">API Keys</h1><p class="mt-1 text-sm text-white/50">Create API keys to authenticate with the Ash server</p></div><div class="rounded-2xl border border-white/10 bg-[#1c2129] transition-all duration-200"><div class="p-4 sm:p-6"><div class="flex gap-3"><div class="space-y-1.5"><input class="flex h-9 w-full rounded-xl border px-3 py-1 text-sm transition-all duration-200 bg-white/5 border-white/10 text-white placeholder:text-white/40 focus-visible:outline-none focus-visible:border-indigo-500/50 focus-visible:bg-white/10 disabled:cursor-not-allowed disabled:opacity-50 flex-1" placeholder="Key name (e.g. production)" value=""/></div><button class="inline-flex items-center justify-center transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500/50 disabled:pointer-events-none disabled:opacity-50 bg-indigo-500 text-white font-medium hover:bg-indigo-400 h-9 px-4 text-sm rounded-xl"><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-plus h-4 w-4 mr-2"><path d="M5 12h14"></path><path d="M12 5v14"></path></svg>Create Key</button></div></div></div><div class="rounded-2xl border border-white/10 bg-[#1c2129] transition-all duration-200"><div class="flex flex-col space-y-1.5 px-4 pt-4 pb-0 sm:px-6 sm:pt-6 sm:pb-0"><h3 class="text-lg font-semibold leading-none tracking-tight text-white">Getting Started</h3></div><div class="p-4 sm:p-6"><div class="rounded-lg bg-black/30 p-4 font-mono text-sm text-white/80 space-y-1"><div class="text-white/40"># Set your API key</div><div>export ASH_API_KEY=ash_sk_...</div><div class="text-white/40 mt-3"># Deploy an agent</div><div>ash deploy ./my-agent --name my-agent</div></div></div></div><div class="rounded-2xl border border-white/10 bg-[#1c2129] transition-all duration-200"><div class="flex flex-col space-y-1.5 px-4 pt-4 pb-0 sm:px-6 sm:pt-6 sm:pb-0"><h3 class="text-lg font-semibold leading-none tracking-tight text-white">Active Keys</h3></div><div class="sm:p-6 p-0"><div class="p-4 space-y-2"><div class="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]" style="width:100%;height:40px"></div><div class="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]" style="width:100%;height:40px"></div><div class="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]" style="width:100%;height:40px"></div></div></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[4636,[],\"ClientPageRoot\"]\n8:I[9336,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"929\",\"static/chunks/929-f69b424a1300c015.js\",\"648\",\"static/chunks/app/settings/api-keys/page-61050d36db9bf298.js\"],\"default\"]\nb:I[1464,[],\"OutletBoundary\"]\nd:I[6673,[],\"AsyncMetadataOutlet\"]\nf:I[1464,[],\"ViewportBoundary\"]\n11:I[1464,[],\"MetadataBoundary\"]\n12:\"$Sreact.suspense\"\n14: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\":[\"\",\"settings\",\"api-keys\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"settings\",{\"children\":[\"api-keys\",{\"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\":[[[\"$\",\"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.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]}]}]]}]]}],{\"children\":[\"settings\",[\"$\",\"$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\":[\"api-keys\",[\"$\",\"$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\":[[\"$\",\"$L7\",null,{\"Component\":\"$8\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@9\",\"$@a\"]}],null,[\"$\",\"$Lb\",null,{\"children\":[\"$Lc\",[\"$\",\"$Ld\",null,{\"promise\":\"$@e\"}]]}]]}],{},null,false]},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$Lf\",null,{\"children\":\"$L10\"}],null],[\"$\",\"$L11\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$12\",null,{\"fallback\":null,\"children\":\"$L13\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$14\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:{}\na:\"$0:f:0:1:2:children:2:children:2:children:1:props:children:0:props:params\"\n"])</script><script>self.__next_f.push([1,"10:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\nc:null\n"])</script><script>self.__next_f.push([1,"e:{\"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,"13:\"$e:metadata\"\n"])</script></body></html>
@@ -1,19 +1,19 @@
1
1
  1:"$Sreact.fragment"
2
- 2: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"],""]
3
- 3: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"]
4
- 4: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"]
2
+ 2: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"],""]
3
+ 3: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"]
4
+ 4: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"]
5
5
  5:I[2229,[],""]
6
6
  6:I[1457,[],""]
7
7
  7:I[4636,[],"ClientPageRoot"]
8
- 8:I[9336,["513","static/chunks/513-c4683887323154aa.js","53","static/chunks/53-b012ce05184a4754.js","929","static/chunks/929-b631fe082fe4e852.js","648","static/chunks/app/settings/api-keys/page-61050d36db9bf298.js"],"default"]
8
+ 8:I[9336,["513","static/chunks/513-c4683887323154aa.js","53","static/chunks/53-b012ce05184a4754.js","929","static/chunks/929-f69b424a1300c015.js","648","static/chunks/app/settings/api-keys/page-61050d36db9bf298.js"],"default"]
9
9
  b:I[1464,[],"OutletBoundary"]
10
10
  d:I[6673,[],"AsyncMetadataOutlet"]
11
11
  f:I[1464,[],"ViewportBoundary"]
12
12
  11:I[1464,[],"MetadataBoundary"]
13
13
  12:"$Sreact.suspense"
14
14
  14:I[5095,[],""]
15
- :HL["/dashboard/_next/static/css/ab505eeeff3f7df5.css","style"]
16
- 0:{"P":null,"b":"sXYgh3eUKXRKt1T_1T3tk","p":"/dashboard","c":["","settings","api-keys",""],"i":false,"f":[[["",{"children":["settings",{"children":["api-keys",{"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":[[["$","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."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}]}]}]]}]]}],{"children":["settings",["$","$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":["api-keys",["$","$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":[["$","$L7",null,{"Component":"$8","searchParams":{},"params":{},"promises":["$@9","$@a"]}],null,["$","$Lb",null,{"children":["$Lc",["$","$Ld",null,{"promise":"$@e"}]]}]]}],{},null,false]},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Lf",null,{"children":"$L10"}],null],["$","$L11",null,{"children":["$","div",null,{"hidden":true,"children":["$","$12",null,{"fallback":null,"children":"$L13"}]}]}]]}],false]],"m":"$undefined","G":["$14",[]],"s":false,"S":true}
15
+ :HL["/dashboard/_next/static/css/2c57b4d6ae47f2bd.css","style"]
16
+ 0:{"P":null,"b":"7bfIRYNSIrLnufuHDu6SP","p":"/dashboard","c":["","settings","api-keys",""],"i":false,"f":[[["",{"children":["settings",{"children":["api-keys",{"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":[[["$","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."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}]}]}]]}]]}],{"children":["settings",["$","$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":["api-keys",["$","$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":[["$","$L7",null,{"Component":"$8","searchParams":{},"params":{},"promises":["$@9","$@a"]}],null,["$","$Lb",null,{"children":["$Lc",["$","$Ld",null,{"promise":"$@e"}]]}]]}],{},null,false]},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Lf",null,{"children":"$L10"}],null],["$","$L11",null,{"children":["$","div",null,{"hidden":true,"children":["$","$12",null,{"fallback":null,"children":"$L13"}]}]}]]}],false]],"m":"$undefined","G":["$14",[]],"s":false,"S":true}
17
17
  9:{}
18
18
  a:"$0:f:0:1:2:children:2:children:2:children:1:props:children:0:props:params"
19
19
  10:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
@@ -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><script src="/dashboard/_next/static/chunks/app/settings/credentials/page-ffe97ffb2f60229d.js" async=""></script><link rel="preload" href="/dashboard/config.js" as="script"/><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-indigo-400" 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 class="space-y-6"><div class="flex items-center justify-between"><div><h1 class="text-2xl font-bold text-white">Credentials</h1><p class="mt-1 text-sm text-white/50">Store API keys for LLM providers. Encrypted at rest.</p></div><button class="inline-flex items-center justify-center transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500/50 disabled:pointer-events-none disabled:opacity-50 bg-indigo-500 text-white font-medium hover:bg-indigo-400 h-9 px-4 text-sm rounded-xl"><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-plus h-4 w-4 mr-2"><path d="M5 12h14"></path><path d="M12 5v14"></path></svg>Add Credential</button></div><div class="rounded-2xl border border-white/10 bg-[#1c2129] transition-all duration-200"><div class="sm:p-6 p-0"><div class="p-4 space-y-2"><div class="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]" style="width:100%;height:48px"></div><div class="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]" style="width:100%;height:48px"></div><div class="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]" style="width:100%;height:48px"></div></div></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[4636,[],\"ClientPageRoot\"]\n8:I[8031,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"929\",\"static/chunks/929-b631fe082fe4e852.js\",\"167\",\"static/chunks/app/settings/credentials/page-ffe97ffb2f60229d.js\"],\"default\"]\nb:I[1464,[],\"OutletBoundary\"]\nd:I[6673,[],\"AsyncMetadataOutlet\"]\nf:I[1464,[],\"ViewportBoundary\"]\n11:I[1464,[],\"MetadataBoundary\"]\n12:\"$Sreact.suspense\"\n14: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\":[\"\",\"settings\",\"credentials\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"settings\",{\"children\":[\"credentials\",{\"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\":[[[\"$\",\"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.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]}]}]]}]]}],{\"children\":[\"settings\",[\"$\",\"$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\":[\"credentials\",[\"$\",\"$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\":[[\"$\",\"$L7\",null,{\"Component\":\"$8\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@9\",\"$@a\"]}],null,[\"$\",\"$Lb\",null,{\"children\":[\"$Lc\",[\"$\",\"$Ld\",null,{\"promise\":\"$@e\"}]]}]]}],{},null,false]},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$Lf\",null,{\"children\":\"$L10\"}],null],[\"$\",\"$L11\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$12\",null,{\"fallback\":null,\"children\":\"$L13\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$14\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:{}\na:\"$0:f:0:1:2:children:2:children:2:children:1:props:children:0:props:params\"\n"])</script><script>self.__next_f.push([1,"10:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\nc:null\n"])</script><script>self.__next_f.push([1,"e:{\"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,"13:\"$e: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><script src="/dashboard/_next/static/chunks/app/settings/credentials/page-9ab78fa32e44448a.js" async=""></script><link rel="preload" href="/dashboard/config.js" as="script"/><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-indigo-400" 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 class="space-y-6"><div class="flex items-center justify-between"><div><h1 class="text-2xl font-bold text-white">Credentials</h1><p class="mt-1 text-sm text-white/50">Store API keys for LLM providers. Encrypted at rest.</p></div><button class="inline-flex items-center justify-center transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500/50 disabled:pointer-events-none disabled:opacity-50 bg-indigo-500 text-white font-medium hover:bg-indigo-400 h-9 px-4 text-sm rounded-xl"><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-plus h-4 w-4 mr-2"><path d="M5 12h14"></path><path d="M12 5v14"></path></svg>Add Credential</button></div><div class="rounded-2xl border border-white/10 bg-[#1c2129] transition-all duration-200"><div class="sm:p-6 p-0"><div class="p-4 space-y-2"><div class="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]" style="width:100%;height:48px"></div><div class="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]" style="width:100%;height:48px"></div><div class="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]" style="width:100%;height:48px"></div></div></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[4636,[],\"ClientPageRoot\"]\n8:I[8031,[\"513\",\"static/chunks/513-c4683887323154aa.js\",\"53\",\"static/chunks/53-b012ce05184a4754.js\",\"929\",\"static/chunks/929-f69b424a1300c015.js\",\"167\",\"static/chunks/app/settings/credentials/page-9ab78fa32e44448a.js\"],\"default\"]\nb:I[1464,[],\"OutletBoundary\"]\nd:I[6673,[],\"AsyncMetadataOutlet\"]\nf:I[1464,[],\"ViewportBoundary\"]\n11:I[1464,[],\"MetadataBoundary\"]\n12:\"$Sreact.suspense\"\n14: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\":[\"\",\"settings\",\"credentials\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"settings\",{\"children\":[\"credentials\",{\"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\":[[[\"$\",\"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.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]}]}]]}]]}],{\"children\":[\"settings\",[\"$\",\"$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\":[\"credentials\",[\"$\",\"$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\":[[\"$\",\"$L7\",null,{\"Component\":\"$8\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@9\",\"$@a\"]}],null,[\"$\",\"$Lb\",null,{\"children\":[\"$Lc\",[\"$\",\"$Ld\",null,{\"promise\":\"$@e\"}]]}]]}],{},null,false]},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$Lf\",null,{\"children\":\"$L10\"}],null],[\"$\",\"$L11\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$12\",null,{\"fallback\":null,\"children\":\"$L13\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$14\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:{}\na:\"$0:f:0:1:2:children:2:children:2:children:1:props:children:0:props:params\"\n"])</script><script>self.__next_f.push([1,"10:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\nc:null\n"])</script><script>self.__next_f.push([1,"e:{\"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,"13:\"$e:metadata\"\n"])</script></body></html>
@@ -1,19 +1,19 @@
1
1
  1:"$Sreact.fragment"
2
- 2: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"],""]
3
- 3: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"]
4
- 4: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"]
2
+ 2: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"],""]
3
+ 3: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"]
4
+ 4: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"]
5
5
  5:I[2229,[],""]
6
6
  6:I[1457,[],""]
7
7
  7:I[4636,[],"ClientPageRoot"]
8
- 8:I[8031,["513","static/chunks/513-c4683887323154aa.js","53","static/chunks/53-b012ce05184a4754.js","929","static/chunks/929-b631fe082fe4e852.js","167","static/chunks/app/settings/credentials/page-ffe97ffb2f60229d.js"],"default"]
8
+ 8:I[8031,["513","static/chunks/513-c4683887323154aa.js","53","static/chunks/53-b012ce05184a4754.js","929","static/chunks/929-f69b424a1300c015.js","167","static/chunks/app/settings/credentials/page-9ab78fa32e44448a.js"],"default"]
9
9
  b:I[1464,[],"OutletBoundary"]
10
10
  d:I[6673,[],"AsyncMetadataOutlet"]
11
11
  f:I[1464,[],"ViewportBoundary"]
12
12
  11:I[1464,[],"MetadataBoundary"]
13
13
  12:"$Sreact.suspense"
14
14
  14:I[5095,[],""]
15
- :HL["/dashboard/_next/static/css/ab505eeeff3f7df5.css","style"]
16
- 0:{"P":null,"b":"sXYgh3eUKXRKt1T_1T3tk","p":"/dashboard","c":["","settings","credentials",""],"i":false,"f":[[["",{"children":["settings",{"children":["credentials",{"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":[[["$","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."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}]}]}]]}]]}],{"children":["settings",["$","$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":["credentials",["$","$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":[["$","$L7",null,{"Component":"$8","searchParams":{},"params":{},"promises":["$@9","$@a"]}],null,["$","$Lb",null,{"children":["$Lc",["$","$Ld",null,{"promise":"$@e"}]]}]]}],{},null,false]},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Lf",null,{"children":"$L10"}],null],["$","$L11",null,{"children":["$","div",null,{"hidden":true,"children":["$","$12",null,{"fallback":null,"children":"$L13"}]}]}]]}],false]],"m":"$undefined","G":["$14",[]],"s":false,"S":true}
15
+ :HL["/dashboard/_next/static/css/2c57b4d6ae47f2bd.css","style"]
16
+ 0:{"P":null,"b":"7bfIRYNSIrLnufuHDu6SP","p":"/dashboard","c":["","settings","credentials",""],"i":false,"f":[[["",{"children":["settings",{"children":["credentials",{"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":[[["$","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."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}]}]}]]}]]}],{"children":["settings",["$","$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":["credentials",["$","$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":[["$","$L7",null,{"Component":"$8","searchParams":{},"params":{},"promises":["$@9","$@a"]}],null,["$","$Lb",null,{"children":["$Lc",["$","$Ld",null,{"promise":"$@e"}]]}]]}],{},null,false]},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Lf",null,{"children":"$L10"}],null],["$","$L11",null,{"children":["$","div",null,{"hidden":true,"children":["$","$12",null,{"fallback":null,"children":"$L13"}]}]}]]}],false]],"m":"$undefined","G":["$14",[]],"s":false,"S":true}
17
17
  9:{}
18
18
  a:"$0:f:0:1:2:children:2:children:2:children:1:props:children:0:props:params"
19
19
  10:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ash-ai/dashboard",
3
- "version": "0.0.7",
3
+ "version": "0.1.0",
4
4
  "files": [
5
5
  "out",
6
6
  "app",
@@ -18,9 +18,9 @@
18
18
  "react": "^19.1.0",
19
19
  "react-dom": "^19.1.0",
20
20
  "tailwind-merge": "^2.6.1",
21
- "@ash-ai/sdk": "0.1.0",
22
- "@ash-ai/ui": "1.0.0",
23
- "@ash-ai/shared": "0.1.0"
21
+ "@ash-ai/sdk": "0.1.2",
22
+ "@ash-ai/shared": "0.2.0",
23
+ "@ash-ai/ui": "1.0.2"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@tailwindcss/postcss": "^4.1.8",
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[447],{6447:(e,t,s)=>{s.r(t),s.d(t,{BottomPanels:()=>em,Chat:()=>ea,ChatInput:()=>ei,ChatMessage:()=>er,ChatMessages:()=>el,FileBrowser:()=>eu,FileTree:()=>ex,Playground:()=>ev,PlaygroundHeader:()=>et,PlaygroundProvider:()=>y,SessionHistory:()=>eo,StatusIndicator:()=>ee,Terminal:()=>ed,ThinkingBlock:()=>es,ToolCallBlock:()=>en,buildFileTree:()=>d,cn:()=>a,formatBytes:()=>o,formatTime:()=>c,getFileLanguage:()=>m,isImageFile:()=>u,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(h(n))}catch(e){return{text:t,toolCalls:[],thinking:[]}}else if(Array.isArray(t))s=t;else if(t&&"object"==typeof t)return e(h(t));if(!s)return{text:"string"==typeof t?t:"",toolCalls:[],thinking:[]};let n="",r=[],l=[];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)r.push({id:t.id||"tool-".concat(r.length),name:t.name||"unknown",input:t.input,state:"completed"});else if("tool_result"===t.type){let e=r.find(e=>e.id===t.tool_use_id);if(e){var i;e.output=t.content,e.isError=null!=(i=t.is_error)&&i,e.state=t.is_error?"error":"completed"}}else if("thinking"===t.type){let e=t.thinking||t.text||"";e&&l.push(e)}}return{text:n,toolCalls:r,thinking:l}},useAgents:()=>g,useFileBrowser:()=>eg,useFileUpload:()=>j,useHealthCheck:()=>f,usePlaygroundChat:()=>p,usePlaygroundContext:()=>b,useSessions:()=>w,useTerminal:()=>ep});var n=s(6862),r=s(3690),l=s(4166),i=s(534);function a(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,r.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 r=e[t],l=t===e.length-1,i=e.slice(0,t+1).join("/"),a=n.find(e=>e.name===r&&!l===e.isDir);a||(a={name:r,path:i,isDir:!l,size:l?s.size:void 0,modifiedAt:l?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 h(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 x=new Set(["png","jpg","jpeg","gif","svg","webp","ico"]);function u(e){var t;let s=null==(t=e.split(".").pop())?void 0:t.toLowerCase();return x.has(s||"")}function m(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:r,onError:i}=e,[a,o]=(0,l.useState)([]),[c,d]=(0,l.useState)(""),[h,x]=(0,l.useState)(!1),[u,m]=(0,l.useState)(!1),[p,g]=(0,l.useState)(null),[w,f]=(0,l.useState)(null!=n?n:null),[j,v]=(0,l.useState)([]),b=(0,l.useRef)(!1),y=(0,l.useCallback)(()=>{f(null),o([]),v([]),g(null)},[]),N=(0,l.useCallback)(async e=>{f(e),m(!0),g(null);try{let i=await t.listMessages(e),a=[];for(let e=0;e<i.length;e++){var s,n,r,l;let t,o=i[e],c="",d=[];try{t=JSON.parse(o.content)}catch(e){t=o.content}let h=t;if("assistant"===h.type&&Array.isArray(null==(s=h.message)?void 0:s.content))for(let e of h.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"===h.type&&h.tool_use_result){let e=h.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!=(r=e.stdout)?r:e.content,t.isError=null!=(l=e.is_error)&&l,t.state=e.is_error?"error":"completed");continue}if("user"===h.type&&!h.tool_use_result){let t=Array.isArray(h.content)?h.content.filter(e=>"text"===e.type).map(e=>e.text).join("\n"):"string"==typeof h.content?h.content:"";t&&a.push({id:o.id||"msg-".concat(e),role:"user",content:t,timestamp:o.createdAt});continue}"result"===h.type&&"string"==typeof h.result&&(c=h.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{m(!1)}},[t]),k=(0,l.useCallback)(async()=>{let e=c.trim(),n=j.filter(e=>!e.uploading);if(!e&&0===n.length||!s||b.current)return;let l=e;if(n.length>0){let e=n.map(e=>"[Attached file: ".concat(e.filename,"](").concat(e.url,")")).join("\n");l=l?"".concat(l,"\n\n").concat(e):e}let a=w;if(!a){x(!0),b.current=!0,g(null);try{a=(await t.createSession(s)).id,f(a),null==r||r(a)}catch(t){let e=t instanceof Error?t.message:"Failed to create session";g(e),null==i||i(e),x(!1),b.current=!1;return}}d(""),v([]);let h={id:"user-".concat(Date.now()),role:"user",content:l,timestamp:new Date().toISOString()};o(e=>[...e,h]),x(!0),b.current=!0;let u="assistant-".concat(Date.now());o(e=>[...e,{id:u,role:"assistant",content:"",isStreaming:!0}]);try{let e="",s=[];for await(let n of t.sendMessageStream(a,l,{includePartialMessages:!0})){var m,p,y;if("text_delta"===n.type){let t=n.data.delta||"";e+=t,o(t=>t.map(t=>t.id===u?{...t,content:e,toolCalls:[...s],isStreaming:!0}:t))}else if("tool_use"===n.type){let t=n.data,r={id:t.id||"tool-".concat(Date.now(),"-").concat(s.length),name:t.name||"unknown",input:t.input,state:"running"};s.push(r),o(t=>t.map(t=>t.id===u?{...t,content:e,toolCalls:[...s],isStreaming:!0}:t))}else if("tool_result"===n.type){let t=n.data,r=s.findIndex(e=>e.id===t.tool_use_id);-1!==r?s[r]={...s[r],output:t.content,isError:null!=(m=t.is_error)&&m,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===u?{...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===u?{...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===u?{...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===u?{...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===u&&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===u?{...t,role:"system",content:"Error: ".concat(e),isStreaming:!1}:t))}finally{x(!1),b.current=!1}},[c,j,w,s,t,r,i]);return{messages:a,input:c,setInput:d,sending:h,loading:u,error:p,sessionId:w,attachedFiles:j,setAttachedFiles:v,send:k,loadSession:N,startNewChat:y,setMessages:o}}function g(e){let{client:t}=e,[s,n]=(0,l.useState)([]),[r,i]=(0,l.useState)(!0),[a,o]=(0,l.useState)(null),c=async()=>{i(!0),o(null);try{let e=await t.listAgents();n(e)}catch(e){o(e instanceof Error?e.message:"Failed to fetch agents")}finally{i(!1)}};return(0,l.useEffect)(()=>{c()},[]),{agents:s,loading:r,error:a,refresh:c}}function w(e){let{client:t,agent:s,limit:n=20,enabled:r=!0}=e,[i,a]=(0,l.useState)([]),[o,c]=(0,l.useState)(!1),[d,h]=(0,l.useState)(null),x=(0,l.useCallback)(async()=>{c(!0),h(null);try{let e=await t.listSessions({agent:s,limit:n});a(e)}catch(e){h(e instanceof Error?e.message:"Failed to fetch sessions")}finally{c(!1)}},[t,s,n]);return(0,l.useEffect)(()=>{r&&x()},[r,x]),{sessions:i,loading:o,error:d,refresh:x}}function f(e){let{client:t}=e,[s,n]=(0,l.useState)(null),r=async()=>{try{await t.health(),n(!0)}catch(e){n(!1)}};return(0,l.useEffect)(()=>{r()},[]),{connected:s,refresh:r}}function j(e){let{client:t,onFilesChange:s,onError:n}=e;return{handleFileSelect:(0,l.useCallback)(async e=>{let r=e.target.files;if(r&&0!==r.length){for(let e of Array.from(r)){let r="uploading-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2));s(t=>[...t,{id:r,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)}),l=await t.uploadFile({filename:e.name,content:n,mimeType:e.type||void 0,ttl:"24h"}),i=await t.getFileUrl(l.id);s(t=>t.map(t=>t.id===r?{id:l.id,filename:e.name,url:i,uploading:!1}:t))}catch(t){s(e=>e.filter(e=>e.id!==r)),null==n||n("Failed to upload ".concat(e.name))}}e.target.value=""}},[t,s,n]),removeFile:(0,l.useCallback)(e=>{s(t=>t.filter(t=>t.id!==e))},[s])}}var v=(0,l.createContext)(null);function b(){let e=(0,l.useContext)(v);if(!e)throw Error("usePlaygroundContext must be used within <PlaygroundProvider>");return e}function y(e){var t,s;let{client:n,defaultAgent:r,children:a}=e,[o,c]=(0,l.useState)(r||""),[d,h]=(0,l.useState)(!1),[x,u]=(0,l.useState)(!1),[m,b]=(0,l.useState)(!1),y=g({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=w({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,l.useCallback)(e=>{c(e),C.startNewChat()},[C]);return(0,i.jsx)(v.Provider,{value:{client:n,chat:C,agents:y,sessions:S,health:N,fileUpload:L,selectedAgent:k,setSelectedAgent:M,showHistory:d,setShowHistory:h,terminalOpen:x,setTerminalOpen:u,filesOpen:m,setFilesOpen:b},children:a})}function N(e,t){return s=>{var n;return(0,i.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,i.jsx)("path",{d:e})})}}var k=e=>(0,i.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,i.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,i.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,i.jsx)("path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4"}),(0,i.jsx)("path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375"}),(0,i.jsx)("path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5"}),(0,i.jsx)("path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396"}),(0,i.jsx)("path",{d:"M19.938 10.5a4 4 0 0 1 .585.396"}),(0,i.jsx)("path",{d:"M6 18a4 4 0 0 1-1.967-.516"}),(0,i.jsx)("path",{d:"M19.967 17.484A4 4 0 0 1 18 18"})]}),C=e=>(0,i.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,i.jsx)("path",{d:"M12 8V4H8"}),(0,i.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,i.jsx)("path",{d:"M2 14h2"}),(0,i.jsx)("path",{d:"M20 14h2"}),(0,i.jsx)("path",{d:"M15 13v2"}),(0,i.jsx)("path",{d:"M9 13v2"})]}),S=e=>(0,i.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,i.jsx)("path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}),(0,i.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,i.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,i.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,i.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,i.jsx)("polyline",{points:"4 17 10 11 4 5"}),(0,i.jsx)("line",{x1:"12",x2:"20",y1:"19",y2:"19"})]}),A=e=>(0,i.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,i.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"})}),B=e=>(0,i.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,i.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"})}),D=e=>(0,i.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,i.jsx)("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),(0,i.jsx)("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),(0,i.jsx)("path",{d:"M10 9H8"}),(0,i.jsx)("path",{d:"M16 13H8"}),(0,i.jsx)("path",{d:"M16 17H8"})]}),_=e=>(0,i.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,i.jsx)("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),(0,i.jsx)("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),(0,i.jsx)("path",{d:"m10 13-2 2 2 2"}),(0,i.jsx)("path",{d:"m14 17 2-2-2-2"})]}),E=e=>(0,i.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,i.jsx)("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),(0,i.jsx)("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),(0,i.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,i.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"})]}),H=e=>(0,i.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,i.jsx)("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}),(0,i.jsx)("circle",{cx:"9",cy:"9",r:"2"}),(0,i.jsx)("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"})]}),W=e=>(0,i.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,i.jsx)("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),I=N("m6 9 6 6 6-6"),T=N("m18 15-6-6-6 6"),P=N("m9 18 6-6-6-6"),R=e=>(0,i.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,i.jsx)("path",{d:"M5 12h14"}),(0,i.jsx)("path",{d:"M12 5v14"})]}),O=e=>(0,i.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,i.jsx)("path",{d:"M18 6 6 18"}),(0,i.jsx)("path",{d:"m6 6 12 12"})]}),V=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"),U=e=>(0,i.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,i.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,i.jsx)("polyline",{points:"12 6 12 12 16 14"})]}),Z=e=>(0,i.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,i.jsx)("path",{d:"M12 20h.01"}),(0,i.jsx)("path",{d:"M2 8.82a15 15 0 0 1 20 0"}),(0,i.jsx)("path",{d:"M5 12.859a10 10 0 0 1 14 0"}),(0,i.jsx)("path",{d:"M8.5 16.429a5 5 0 0 1 7 0"})]}),z=e=>(0,i.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,i.jsx)("path",{d:"M12 20h.01"}),(0,i.jsx)("path",{d:"M8.5 16.429a5 5 0 0 1 7 0"}),(0,i.jsx)("path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69"}),(0,i.jsx)("path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523"}),(0,i.jsx)("path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643"}),(0,i.jsx)("path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764"}),(0,i.jsx)("path",{d:"m2 2 20 20"})]}),J=e=>(0,i.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,i.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"})}),K=e=>(0,i.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,i.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,i.jsx)("path",{d:"m9 12 2 2 4-4"})]}),q=e=>(0,i.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,i.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,i.jsx)("path",{d:"m15 9-6 6"}),(0,i.jsx)("path",{d:"m9 9 6 6"})]}),G=e=>(0,i.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,i.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,i.jsx)("path",{d:"m21 21-4.3-4.3"})]}),Q=e=>(0,i.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,i.jsx)("path",{d:"M3 6h18"}),(0,i.jsx)("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),(0,i.jsx)("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}),(0,i.jsx)("line",{x1:"10",x2:"10",y1:"11",y2:"17"}),(0,i.jsx)("line",{x1:"14",x2:"14",y1:"11",y2:"17"})]}),Y=N("M12 5v14 m7-7-7 7-7-7"),$=e=>(0,i.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,i.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,i.jsx)("polyline",{points:"7 10 12 15 17 10"}),(0,i.jsx)("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]}),X=e=>(0,i.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,i.jsx)("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),(0,i.jsx)("path",{d:"M21 3v5h-5"}),(0,i.jsx)("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),(0,i.jsx)("path",{d:"M8 16H3v5"})]});function ee(e){let{connected:t,className:s}=e;return null===t?null:(0,i.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,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Z,{className:"h-3 w-3"})," Runtime connected"]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(z,{className:"h-3 w-3"})," Runtime disconnected"]})})}function et(e){let{agents:t,selectedAgent:s,onAgentChange:n,runtimeConnected:r,showHistory:l,onToggleHistory:o,sessionId:c,onNewChat:d,className:h}=e;return(0,i.jsxs)("div",{className:a("shrink-0 flex items-center justify-between border-b border-white/10 pb-3 mb-4",h),children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 text-xs font-medium text-white/40 uppercase tracking-wider",children:[(0,i.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-accent animate-pulse"}),"PLAYGROUND"]}),(0,i.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,i.jsx)("option",{value:"",disabled:!0,children:"Select agent..."}),t.map(e=>(0,i.jsx)("option",{value:e.slug||e.name,children:e.name},e.id))]}),(0,i.jsx)(ee,{connected:r})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.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",l?"bg-accent/10 text-accent border-accent/30":"bg-white/5 text-white/50 border-white/10 hover:bg-white/10"),children:[(0,i.jsx)(U,{className:"h-3 w-3"}),"History"]}),s&&(0,i.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,i.jsx)(R,{className:"h-3 w-3"}),"New Chat"]})]})]})}function es(e){let{thinking:t}=e,[s,n]=(0,l.useState)(!1),r=t.join("\n\n");return(0,i.jsxs)("div",{className:"my-2 rounded-lg border border-amber-500/20 bg-amber-500/[0.03] overflow-hidden",children:[(0,i.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,i.jsx)(k,{className:"h-3.5 w-3.5 shrink-0 text-amber-500/60"}),(0,i.jsx)("span",{className:"text-xs font-medium text-amber-400/70",children:"Thinking"}),(0,i.jsx)("span",{className:"ml-auto flex items-center gap-1.5",children:s?(0,i.jsx)(I,{className:"h-3 w-3 text-white/30"}):(0,i.jsx)(P,{className:"h-3 w-3 text-white/30"})})]}),s&&(0,i.jsx)("div",{className:"border-t border-amber-500/10 px-3 py-2",children:(0,i.jsx)("pre",{className:"whitespace-pre-wrap text-xs text-white/50 leading-relaxed max-h-96 overflow-y-auto",children:r})})]})}function en(e){let{tool:t}=e,[s,n]=(0,l.useState)(!1),r="running"===t.state||"pending"===t.state,o="error"===t.state,c="completed"===t.state;return(0,i.jsxs)("div",{className:"my-2 rounded-lg border border-white/10 bg-white/[0.03] overflow-hidden",children:[(0,i.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,i.jsx)(J,{className:"h-3.5 w-3.5 shrink-0 text-white/40"}),(0,i.jsx)("span",{className:"text-xs font-medium text-white/70 truncate",children:t.name}),(0,i.jsxs)("span",{className:"ml-auto flex items-center gap-1.5",children:[r&&(0,i.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,i.jsx)(W,{className:"h-3 w-3 animate-spin"}),"Running"]}),c&&(0,i.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,i.jsx)(K,{className:"h-3 w-3"}),"Done"]}),o&&(0,i.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,i.jsx)(q,{className:"h-3 w-3"}),"Error"]}),s?(0,i.jsx)(I,{className:"h-3 w-3 text-white/30"}):(0,i.jsx)(P,{className:"h-3 w-3 text-white/30"})]})]}),s&&(0,i.jsxs)("div",{className:"border-t border-white/10 px-3 py-2 space-y-2",children:[null!=t.input&&(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"text-[10px] font-medium text-white/30 uppercase tracking-wider mb-1",children:"Input"}),(0,i.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,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"text-[10px] font-medium text-white/30 uppercase tracking-wider mb-1",children:o?"Error":"Output"}),(0,i.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 er(e){var t;let{message:s}=e,n="user"===s.role;return"system"===s.role?(0,i.jsx)("div",{className:"flex justify-center",children:(0,i.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,i.jsxs)("div",{className:a("flex gap-3",n?"flex-row-reverse":"flex-row"),children:[(0,i.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,i.jsx)(S,{className:"h-4 w-4 text-accent"}):(0,i.jsx)(C,{className:"h-4 w-4 text-white/60"})}),(0,i.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,i.jsx)(es,{thinking:s.thinking}),s.content&&(0,i.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,i.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,i.jsxs)("div",{className:a(s.content&&"mt-2"),children:[s.toolCalls.map(e=>(0,i.jsx)(en,{tool:e},e.id)),s.isStreaming&&s.toolCalls.some(e=>"running"===e.state)&&(0,i.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,i.jsx)("span",{className:"inline-block h-4 w-0.5 animate-pulse bg-accent align-text-bottom"}),s.timestamp&&(0,i.jsx)("div",{className:"mt-1 text-right text-xs text-white/30",children:c(s.timestamp)})]})]})}function el(e){let{messages:t,className:s}=e,n=(0,l.useRef)(null);return(0,l.useEffect)(()=>{n.current&&n.current.scrollTo({top:n.current.scrollHeight,behavior:"smooth"})},[t]),(0,i.jsx)("div",{ref:n,className:null!=s?s:"flex-1 overflow-auto p-4 space-y-3 scrollbar-thin",children:0===t.length?(0,i.jsxs)("div",{className:"flex h-full flex-col items-center justify-center text-center",children:[(0,i.jsx)(M,{className:"mb-3 h-8 w-8 text-white/20"}),(0,i.jsx)("p",{className:"text-sm text-white/40",children:"No messages yet"}),(0,i.jsx)("p",{className:"mt-1 text-xs text-white/30",children:"Send a message to start the conversation"})]}):t.map(e=>(0,i.jsx)(er,{message:e},e.id))})}function ei(e){let{input:t,onInputChange:s,onSend:n,sending:r,disabled:o,placeholder:c="Send a message...",attachedFiles:d=[],onFileSelect:h,onRemoveFile:x,className:u}=e,m=(0,l.useRef)(null),p=(0,l.useRef)(null),g=d.filter(e=>!e.uploading),w=(t.trim()||g.length>0)&&!r&&!o;return(0,i.jsxs)("div",{className:a("shrink-0 border-t border-white/10 p-4",u),children:[d.length>0&&(0,i.jsx)("div",{className:"mb-2 flex flex-wrap gap-2",children:d.map(e=>(0,i.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,i.jsx)(W,{className:"h-3 w-3 animate-spin"}):(0,i.jsx)(V,{className:"h-3 w-3"}),(0,i.jsx)("span",{className:"max-w-[180px] truncate",children:e.filename}),!e.uploading&&x&&(0,i.jsx)("button",{onClick:()=>x(e.id),className:"ml-0.5 rounded-full p-0.5 hover:bg-white/10 transition-colors",children:(0,i.jsx)(O,{className:"h-3 w-3"})})]},e.id))}),(0,i.jsxs)("div",{className:"flex items-end gap-3",children:[h&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("input",{ref:p,type:"file",multiple:!0,onChange:h,className:"hidden"}),(0,i.jsx)("button",{onClick:()=>{var e;return null==(e=p.current)?void 0:e.click()},disabled:r||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",(r||o)&&"opacity-50 cursor-not-allowed"),title:"Attach files",children:(0,i.jsx)(V,{className:"h-4 w-4"})})]}),(0,i.jsx)("textarea",{ref:m,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,i.jsx)("button",{onClick:n,disabled:!w,className:a("flex h-11 w-11 shrink-0 items-center justify-center rounded-xl transition-colors",w?"bg-accent text-white hover:bg-accent/90":"bg-white/5 text-white/20 cursor-not-allowed"),children:r?(0,i.jsx)(W,{className:"h-4 w-4 animate-spin"}):(0,i.jsx)(L,{className:"h-4 w-4"})})]})]})}function ea(e){let{messages:t,input:s,onInputChange:n,onSend:r,sending:l,loading:o,error:c,isActive:d,agentName:h,attachedFiles:x,onFileSelect:u,onRemoveFile:m,className:p}=e;return(0,i.jsxs)("div",{className:a("flex flex-col overflow-hidden",p),children:[o?(0,i.jsxs)("div",{className:"flex flex-1 items-center justify-center",children:[(0,i.jsx)(W,{className:"mr-2 h-5 w-5 animate-spin text-white/40"}),(0,i.jsx)("span",{className:"text-sm text-white/50",children:"Loading session..."})]}):d?(0,i.jsx)(el,{messages:t}):(0,i.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center text-center px-8",children:[(0,i.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,i.jsx)(M,{className:"h-8 w-8 text-accent"})}),(0,i.jsx)("h2",{className:"text-xl font-semibold text-white",children:"Agent Playground"}),(0,i.jsx)("p",{className:"mt-2 max-w-md text-sm text-white/50",children:h?"Start a new conversation with ".concat(h,", or resume a past session from History."):"Select an agent above to get started."}),h&&(0,i.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,i.jsx)(C,{className:"h-4 w-4 text-accent"}),h]})]}),c&&(0,i.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}),h&&(0,i.jsx)(ei,{input:s,onInputChange:n,onSend:r,sending:l,placeholder:d?"Send a message...":"Send a message to start a new session...",attachedFiles:x,onFileSelect:u,onRemoveFile:m})]})}function eo(e){let{sessions:t,activeSessionId:s,onSelectSession:n,className:r}=e;return(0,i.jsxs)("div",{className:a("w-64 shrink-0 rounded-lg border border-white/10 bg-white/[0.02] flex flex-col overflow-hidden",r),children:[(0,i.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,i.jsx)("div",{className:"flex-1 overflow-auto scrollbar-thin",children:0===t.length?(0,i.jsx)("p",{className:"px-3 py-6 text-center text-xs text-white/30",children:"No sessions yet"}):t.map(e=>(0,i.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,i.jsx)("div",{className:"text-xs font-medium text-white truncate",children:e.agentName}),(0,i.jsxs)("div",{className:"text-[10px] text-white/30 mt-0.5",children:[e.createdAt?new Date(e.createdAt).toLocaleDateString():"No events",(0,i.jsx)("span",{className:"mx-1 text-white/15",children:"|"}),(0,i.jsx)("span",{className:a("active"===e.status?"text-green-400":"text-white/30"),children:e.status})]})]},e.id))})]})}var ec={stdout:"text-green-300",stderr:"text-red-400",system:"text-white/40"};function ed(e){let{logs:t,connected:s,onClear:n,className:r}=e,[o,c]=(0,l.useState)(""),[d,h]=(0,l.useState)(!1),[x,u]=(0,l.useState)(!0),m=(0,l.useRef)(null);(0,l.useEffect)(()=>{x&&m.current&&(m.current.scrollTop=m.current.scrollHeight)},[t,x]);let p=(0,l.useCallback)(()=>{if(!m.current)return;let{scrollTop:e,scrollHeight:t,clientHeight:s}=m.current;u(t-e-s<40)},[]),g=o?t.filter(e=>e.text.toLowerCase().includes(o.toLowerCase())):t;return(0,i.jsxs)("div",{className:a("flex flex-col bg-[#0d1117] rounded-lg border border-white/10 overflow-hidden",r),children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 border-b border-white/10 px-3 py-2 bg-[#161b22]",children:[(0,i.jsx)(F,{className:"h-3.5 w-3.5 text-white/50"}),(0,i.jsx)("span",{className:"text-xs font-medium text-white/60",children:"Terminal"}),(0,i.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,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Z,{className:"h-2.5 w-2.5"})," Live"]}):!1===s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(z,{className:"h-2.5 w-2.5"})," Disconnected"]}):"Connecting..."}),(0,i.jsx)("div",{className:"flex-1"}),(0,i.jsxs)("span",{className:"text-[10px] text-white/30",children:[g.length.toLocaleString()," line",1!==g.length?"s":""]}),(0,i.jsx)("button",{onClick:()=>h(!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,i.jsx)(U,{className:"h-3 w-3"})}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)(G,{className:"absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-white/30"}),(0,i.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"})]}),!x&&(0,i.jsx)("button",{onClick:()=>{m.current&&(m.current.scrollTop=m.current.scrollHeight,u(!0))},className:"rounded p-1 text-white/40 hover:bg-white/10 hover:text-white/70 transition-colors",title:"Scroll to bottom",children:(0,i.jsx)(Y,{className:"h-3 w-3"})}),n&&(0,i.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,i.jsx)(Q,{className:"h-3 w-3"})})]}),(0,i.jsx)("div",{ref:m,onScroll:p,className:"flex-1 overflow-auto p-3 font-mono text-xs leading-5 scrollbar-thin min-h-[120px]",children:0===g.length?(0,i.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"}):g.map((e,t)=>(0,i.jsxs)("div",{className:"flex hover:bg-white/5 rounded px-1 -mx-1",children:[d&&(0,i.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,i.jsx)("span",{className:a("whitespace-pre-wrap break-all",ec[e.level]||"text-white/60"),children:e.text})]},"".concat(e.index,"-").concat(t)))})]})}function eh(e){let{node:t,depth:s,selectedPath:n,expandedDirs:r,onSelectFile:l,onToggleDir:o}=e,c=r.has(t.path),d=n===t.path,h=t.isDir?c?A:B: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||"")?_:["json","yaml","yml","toml"].includes(s||"")?E:["png","jpg","jpeg","gif","svg","webp","ico"].includes(s||"")?H:D}(t.name);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("button",{onClick:()=>t.isDir?o(t.path):l(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,i.jsx)(I,{className:"h-3 w-3 shrink-0 text-white/30"}):(0,i.jsx)(P,{className:"h-3 w-3 shrink-0 text-white/30"}):(0,i.jsx)("span",{className:"w-3"}),(0,i.jsx)(h,{className:a("h-3.5 w-3.5 shrink-0",t.isDir?"text-accent":"text-white/40")}),(0,i.jsx)("span",{className:"truncate",children:t.name}),t.isDir&&t.children.length>0&&(0,i.jsx)("span",{className:"ml-auto text-[10px] text-white/20 shrink-0",children:t.children.length})]}),t.isDir&&c&&t.children.map(e=>(0,i.jsx)(eh,{node:e,depth:s+1,selectedPath:n,expandedDirs:r,onSelectFile:l,onToggleDir:o},e.path))]})}function ex(e){let{nodes:t,selectedPath:s,expandedDirs:n,onSelectFile:r,onToggleDir:l}=e;return(0,i.jsx)("div",{className:"overflow-y-auto scrollbar-thin",children:t.map(e=>(0,i.jsx)(eh,{node:e,depth:0,selectedPath:s,expandedDirs:n,onSelectFile:r,onToggleDir:l},e.path))})}function eu(e){let{files:t,source:s,loading:n,selectedPath:r,fileContent:c,fileLoading:h,fileError:x,expandedDirs:m,filter:p,onFilterChange:g,onSelectFile:w,onToggleDir:f,onRefresh:j,fileBaseUrl:v,className:b}=e,y=(0,l.useRef)(null);if(n)return(0,i.jsxs)("div",{className:a("flex items-center justify-center py-12",b),children:[(0,i.jsx)(W,{className:"mr-2 h-4 w-4 animate-spin text-white/40"}),(0,i.jsx)("span",{className:"text-sm text-white/50",children:"Loading files..."})]});if(0===t.length)return(0,i.jsxs)("div",{className:a("flex flex-col items-center justify-center py-12 text-center",b),children:[(0,i.jsx)(A,{className:"mb-3 h-10 w-10 text-white/20"}),(0,i.jsx)("p",{className:"text-sm font-medium text-white/50",children:"No files in workspace"}),(0,i.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===r),C=v&&r?"".concat(v,"/").concat(r):void 0;return(0,i.jsxs)("div",{className:a("flex flex-col h-full",b),children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 border-b border-white/10 px-3 py-2 shrink-0",children:[s&&(0,i.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,i.jsxs)("span",{className:"text-xs text-white/40",children:[t.length," files"]}),(0,i.jsx)("div",{className:"flex-1"}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)(G,{className:"absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-white/30"}),(0,i.jsx)("input",{type:"text",value:p,onChange:e=>g(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,i.jsx)("button",{onClick:()=>g(""),className:"absolute right-1.5 top-1/2 -translate-y-1/2 text-white/30 hover:text-white",children:(0,i.jsx)(O,{className:"h-3 w-3"})})]}),(0,i.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,i.jsx)(X,{className:"h-3.5 w-3.5"})})]}),(0,i.jsxs)("div",{className:"flex flex-1 min-h-0",children:[(0,i.jsx)("div",{className:"w-64 shrink-0 border-r border-white/10 overflow-y-auto scrollbar-thin",children:(0,i.jsx)(ex,{nodes:N,selectedPath:r,expandedDirs:m,onSelectFile:w,onToggleDir:f})}),(0,i.jsx)("div",{className:"flex-1 min-w-0 flex flex-col overflow-hidden",children:r?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex items-center justify-between border-b border-white/10 px-4 py-2 shrink-0",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,i.jsx)("span",{className:"font-mono text-xs text-white/60 truncate",children:r}),k&&(0,i.jsx)("span",{className:"text-[10px] text-white/30 shrink-0",children:o(k.size)})]}),C&&(0,i.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,i.jsx)($,{className:"h-3.5 w-3.5"})})]}),(0,i.jsx)("div",{className:"flex-1 overflow-auto bg-[#0d1117]",children:h?(0,i.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,i.jsx)(W,{className:"mr-2 h-4 w-4 animate-spin text-white/40"}),(0,i.jsx)("span",{className:"text-xs text-white/50",children:"Loading..."})]}):x?(0,i.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center px-4",children:[(0,i.jsx)("p",{className:"text-xs text-white/40",children:x}),C&&(0,i.jsx)("a",{href:C,download:!0,className:"mt-2 text-xs text-accent hover:underline",children:"Download file"})]}):u(r)?(0,i.jsx)("div",{className:"flex items-center justify-center p-4",children:C&&(0,i.jsx)("img",{src:C,alt:r,className:"max-w-full max-h-[60vh] object-contain rounded"})}):(0,i.jsx)("pre",{ref:y,className:"p-4 text-xs font-mono text-white/70 leading-relaxed whitespace-pre-wrap break-words",children:c})})]}):(0,i.jsx)("div",{className:"flex flex-1 items-center justify-center text-center",children:(0,i.jsxs)("div",{children:[(0,i.jsx)(D,{className:"mx-auto mb-2 h-8 w-8 text-white/15"}),(0,i.jsx)("p",{className:"text-xs text-white/30",children:"Select a file to view its contents"})]})})})]})]})}function em(e){let{terminalOpen:t,onToggleTerminal:s,filesOpen:n,onToggleFiles:r,className:l}=e;return(0,i.jsxs)("div",{className:a("flex border-t border-white/10 bg-[#161b22] rounded-b-lg",l),children:[(0,i.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,i.jsx)(F,{className:"h-3 w-3"}),"Terminal",t?(0,i.jsx)(I,{className:"h-3 w-3"}):(0,i.jsx)(T,{className:"h-3 w-3"})]}),(0,i.jsx)("div",{className:"w-px bg-white/10"}),(0,i.jsxs)("button",{onClick:r,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,i.jsx)(A,{className:"h-3 w-3"}),"Files",n?(0,i.jsx)(I,{className:"h-3 w-3"}):(0,i.jsx)(T,{className:"h-3 w-3"})]})]})}function ep(e){let{client:t,sessionId:s,historical:n,pollInterval:r=500}=e,[i,a]=(0,l.useState)([]),[o,c]=(0,l.useState)(null),d=(0,l.useRef)(-1),h=(0,l.useRef)(null),x=(0,l.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,l.useEffect)(()=>{if(a([]),d.current=-1,c(null),x(),!n)return h.current=setInterval(x,r),()=>{h.current&&clearInterval(h.current)}},[s,n,r,x]),{logs:i,connected:o,clearLogs:(0,l.useCallback)(()=>{a([])},[])}}function eg(e){let{client:t,sessionId:s}=e,[n,r]=(0,l.useState)([]),[i,a]=(0,l.useState)(null),[o,c]=(0,l.useState)(!0),[d,h]=(0,l.useState)(null),[x,u]=(0,l.useState)(null),[m,p]=(0,l.useState)(!1),[g,w]=(0,l.useState)(null),[f,j]=(0,l.useState)(new Set),[v,b]=(0,l.useState)(""),y=(0,l.useCallback)(async()=>{c(!0);try{let e=await t.getSessionFiles(s);r(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,l.useEffect)(()=>{y()},[y]),{files:n,source:i,loading:o,selectedPath:d,fileContent:x,fileLoading:m,fileError:g,expandedDirs:f,filter:v,setFilter:b,selectFile:(0,l.useCallback)(async e=>{var n;h(e),u(null),w(null);let r=null==(n=e.split(".").pop())?void 0:n.toLowerCase();if(!new Set(["png","jpg","jpeg","gif","svg","webp","ico"]).has(r||"")){p(!0);try{let n=await t.getSessionFile(s,e);u(n.content||"")}catch(e){w("Failed to load file content")}finally{p(!1)}}},[t,s]),toggleDir:(0,l.useCallback)(e=>{j(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),refresh:y}}function ew(e){let{className:t}=e,{client:s,chat:n,agents:r,sessions:l,health:o,fileUpload:c,selectedAgent:d,setSelectedAgent:h,showHistory:x,setShowHistory:u,terminalOpen:m,setTerminalOpen:p,filesOpen:g,setFilesOpen:w}=b(),f=r.agents.find(e=>(e.slug||e.name)===d),j=null!==n.sessionId;return(0,i.jsxs)("div",{className:a("flex flex-col",t),children:[(0,i.jsx)(et,{agents:r.agents,selectedAgent:d,onAgentChange:h,runtimeConnected:o.connected,showHistory:x,onToggleHistory:()=>u(!x),sessionId:n.sessionId,onNewChat:n.startNewChat}),(0,i.jsxs)("div",{className:"flex flex-1 gap-4 min-h-0",children:[x&&(0,i.jsx)(eo,{sessions:l.sessions,activeSessionId:n.sessionId,onSelectSession:e=>{n.loadSession(e.id),u(!1)}}),(0,i.jsxs)("div",{className:"flex-1 flex flex-col min-w-0 gap-0",children:[(0,i.jsx)(ea,{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]",m&&n.sessionId?"flex-1 min-h-0":"flex-1")}),n.sessionId&&(0,i.jsx)("div",{className:a("shrink-0 transition-all",m?"h-64":"h-0"),children:m&&(0,i.jsx)(ef,{client:s,sessionId:n.sessionId})}),n.sessionId&&(0,i.jsx)("div",{className:a("shrink-0 transition-all",g?"h-72":"h-0"),children:g&&(0,i.jsx)(ej,{client:s,sessionId:n.sessionId})}),n.sessionId&&(0,i.jsx)(em,{terminalOpen:m,onToggleTerminal:()=>p(!m),filesOpen:g,onToggleFiles:()=>w(!g)})]})]})]})}function ef(e){let{client:t,sessionId:s}=e,{logs:n,connected:r,clearLogs:l}=ep({client:t,sessionId:s});return(0,i.jsx)(ed,{logs:n,connected:r,onClear:l,className:"h-full rounded-t-none border-t-0"})}function ej(e){let{client:t,sessionId:s}=e,n=eg({client:t,sessionId:s});return(0,i.jsx)(eu,{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 ev(e){let{client:t,defaultAgent:s,className:n}=e;return(0,i.jsx)(y,{client:t,defaultAgent:s,children:(0,i.jsx)(ew,{className:n})})}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[319],{3:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(8154).A)("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},50:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(8154).A)("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["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",key:"ruj8y"}]])},286:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>b});var s=n(534),a=n(4166),r=n(9197),i=n(8968),c=n.n(i),l=n(3929),o=n(4765),d=n(5968),h=n(7964),x=n(1804),u=n(2737),m=n(50),f=n(3701),g=n(4275),p=n(3);let v=(0,n(8154).A)("FolderOpen",[["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",key:"usdka0"}]]);var j=n(1924);function y(){let e=(0,r.useSearchParams)().get("name"),[t,n]=(0,a.useState)(null),[i,y]=(0,a.useState)(!0),[b,w]=(0,a.useState)(null);if((0,a.useEffect)(()=>{if(!e)return void y(!1);!async function(){try{let t=(await (0,l.KU)().listAgents()).find(t=>t.name===e);t?n(t):w('Agent "'.concat(e,'" not found'))}catch(e){w(e instanceof Error?e.message:"Failed to fetch agent")}finally{y(!1)}}()},[e]),!e)return(0,s.jsxs)("div",{className:"text-center py-16",children:[(0,s.jsx)("p",{className:"text-white/50",children:"No agent name specified."}),(0,s.jsx)(c(),{href:"/agents",className:"text-indigo-400 hover:text-indigo-300 text-sm mt-2 inline-block",children:"Back to agents"})]});if(i)return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(h.X,{height:80}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[1,2,3].map(e=>(0,s.jsx)(h.X,{height:120},e))})]});if(b||!t)return(0,s.jsxs)("div",{className:"text-center py-16",children:[(0,s.jsx)("p",{className:"text-red-400",children:b||"Agent not found"}),(0,s.jsx)(c(),{href:"/agents",className:"text-indigo-400 hover:text-indigo-300 text-sm mt-2 inline-block",children:"Back to agents"})]});let k=[{label:"Versions",href:"/agents/versions?name=".concat(encodeURIComponent(t.name)),icon:u.A,description:"Manage agent versions and system prompts"},{label:"Knowledge",href:"/agents/knowledge?name=".concat(encodeURIComponent(t.name)),icon:m.A,description:"Upload and manage knowledge base files"},{label:"Evals",href:"/agents/evals?name=".concat(encodeURIComponent(t.name)),icon:f.A,description:"Define and run evaluation test cases"}];return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)(c(),{href:"/agents",className:"inline-flex items-center gap-1.5 text-sm text-white/50 hover:text-white transition-colors",children:[(0,s.jsx)(g.A,{className:"h-4 w-4"}),"Back to agents"]}),(0,s.jsx)(o.Zp,{children:(0,s.jsx)(o.Wu,{children:(0,s.jsxs)("div",{className:"flex items-start gap-4",children:[(0,s.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-xl bg-indigo-500/10",children:(0,s.jsx)(p.A,{className:"h-6 w-6 text-indigo-400"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("h1",{className:"text-xl font-bold text-white",children:t.name}),t.description&&(0,s.jsx)("p",{className:"mt-1 text-sm text-white/50",children:t.description}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[t.model&&(0,s.jsx)(d.E,{variant:"info",children:t.model}),t.status&&(0,s.jsx)(d.E,{variant:"active"===t.status?"success":"default",children:t.status}),t.path&&(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs text-white/30",children:[(0,s.jsx)(v,{className:"h-3 w-3"}),t.path]}),t.createdAt&&(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs text-white/30",children:[(0,s.jsx)(j.A,{className:"h-3 w-3"}),"Created ",(0,x.fw)(t.createdAt)]})]})]})]})})}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:k.map(e=>(0,s.jsx)(c(),{href:e.href,children:(0,s.jsx)(o.Zp,{className:"hover:border-white/20 hover:bg-white/[0.02] transition-all cursor-pointer h-full",children:(0,s.jsxs)(o.Wu,{children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,s.jsx)(e.icon,{className:"h-5 w-5 text-indigo-400"}),(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:e.label})]}),(0,s.jsx)("p",{className:"text-xs text-white/40",children:e.description})]})})},e.label))})]})}function b(){return(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)(h.X,{height:200}),children:(0,s.jsx)(y,{})})}},1804:(e,t,n)=>{"use strict";n.d(t,{Ct:()=>o,ZV:()=>c,a3:()=>l,cn:()=>r,fw:()=>i});var s=n(6862),a=n(3690);function r(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,a.QP)((0,s.$)(t))}function i(e){let t=Date.now(),n=Math.floor((t-new Date(e).getTime())/1e3);if(n<60)return"".concat(n,"s ago");let s=Math.floor(n/60);if(s<60)return"".concat(s,"m ago");let a=Math.floor(s/60);if(a<24)return"".concat(a,"h ago");let r=Math.floor(a/24);return r<30?"".concat(r,"d ago"):new Date(e).toLocaleDateString()}function c(e){return e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"K"):e.toString()}function l(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 o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return e.length>t?e.slice(0,t):e}},1924:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(8154).A)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},2737:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(8154).A)("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]])},2965:(e,t,n)=>{Promise.resolve().then(n.bind(n,286))},3701:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(8154).A)("FlaskConical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]])},4275:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(8154).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},4765:(e,t,n)=>{"use strict";n.d(t,{Wu:()=>l,ZB:()=>c,Zp:()=>r,aR:()=>i});var s=n(534),a=n(1804);function r(e){let{children:t,className:n}=e;return(0,s.jsx)("div",{className:(0,a.cn)("rounded-2xl border border-white/10 bg-[#1c2129] transition-all duration-200",n),children:t})}function i(e){let{children:t,className:n}=e;return(0,s.jsx)("div",{className:(0,a.cn)("flex flex-col space-y-1.5 px-4 pt-4 pb-0 sm:px-6 sm:pt-6 sm:pb-0",n),children:t})}function c(e){let{children:t,className:n}=e;return(0,s.jsx)("h3",{className:(0,a.cn)("text-lg font-semibold leading-none tracking-tight text-white",n),children:t})}function l(e){let{children:t,className:n}=e;return(0,s.jsx)("div",{className:(0,a.cn)("p-4 sm:p-6",n),children:t})}},5968:(e,t,n)=>{"use strict";n.d(t,{E:()=>i,W:()=>c});var s=n(534),a=n(1804);let r={default:"bg-white/10 text-white/70 border border-white/10",success:"bg-green-500/20 text-green-400 border border-green-500/30",warning:"bg-yellow-500/20 text-yellow-400 border border-yellow-500/30",error:"bg-red-500/20 text-red-400 border border-red-500/30",info:"bg-blue-500/20 text-blue-400 border border-blue-500/30"};function i(e){let{children:t,variant:n="default",className:i}=e;return(0,s.jsx)("span",{className:(0,a.cn)("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium",r[n],i),children:t})}function c(e){let{status:t}=e;return(0,s.jsx)(i,{variant:{active:"success",starting:"info",paused:"warning",stopped:"default",ended:"default",error:"error"}[t]||"default",children:t})}},7964:(e,t,n)=>{"use strict";n.d(t,{X:()=>r});var s=n(534),a=n(1804);function r(e){let{width:t="100%",height:n=100,className:r}=e;return(0,s.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]",r),style:{width:"number"==typeof t?"".concat(t,"px"):t,height:n}})}},9197:(e,t,n)=>{"use strict";var s=n(4841);n.o(s,"usePathname")&&n.d(t,{usePathname:function(){return s.usePathname}}),n.o(s,"useSearchParams")&&n.d(t,{useSearchParams:function(){return s.useSearchParams}})}},e=>{e.O(0,[513,53,839,929,705,522,358],()=>e(e.s=2965)),_N_E=e.O()}]);