Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

fix(web): update sidebar agent links to /chat and fix active detection

Generadc81ce7931b
diff --git a/src/web/src/components/app-sidebar.tsx b/src/web/src/components/app-sidebar.tsx
index 64e710fc5..1a3a7c059 100644
--- a/src/web/src/components/app-sidebar.tsx
+++ b/src/web/src/components/app-sidebar.tsx
@@ -23,11 +23,11 @@ export function AppSidebar() {
// Detect active agent from ?agent= param or /w/[slug]/agents/[id] route
const urlAgentId = searchParams.get("agent");
- const pathnameAgentMatch = pathname.match(/^\/w\/[^/]+\/agents\/([^/]+)$/);
+ const pathnameAgentMatch = pathname.match(/^\/w\/[^/]+\/agents\/([^/]+)/);
const activeAgentId = urlAgentId ?? pathnameAgentMatch?.[1] ?? null;
const handleAgentClick = (agentId: string) => {
- router.push(`${prefix}/agents/${agentId}`);
+ router.push(`${prefix}/agents/${agentId}/chat`);
};
return (