Fix agent routing and E2E create flow

This commit is contained in:
Mohamed Boudra
2026-01-24 20:20:56 +07:00
parent 3e2d403f1b
commit dc4839e2c0
14 changed files with 204 additions and 147 deletions
@@ -50,22 +50,16 @@ export function LegacyAgentIdScreen({ agentId }: { agentId: string }) {
return;
}
const match = matches[0];
router.replace({
pathname: "/agent/[[...route]]",
params: { route: [match.serverId, match.agent.id] },
});
router.replace(`/agent/${match.serverId}/${match.agent.id}` as any);
}, [isRedirecting, matches, router]);
const handleGoDraft = useCallback(() => {
router.replace({ pathname: "/agent/[[...route]]" });
router.replace("/agent" as any);
}, [router]);
const handleSelectMatch = useCallback(
(match: AgentMatch) => {
router.replace({
pathname: "/agent/[[...route]]",
params: { route: [match.serverId, match.agent.id] },
});
router.replace(`/agent/${match.serverId}/${match.agent.id}` as any);
},
[router]
);