fix agent create: keep draft view until agent ready

This commit is contained in:
Mohamed Boudra
2026-01-24 19:29:56 +07:00
parent 6ecf88b502
commit 3e2d403f1b
10 changed files with 133 additions and 51 deletions
@@ -51,19 +51,19 @@ export function LegacyAgentIdScreen({ agentId }: { agentId: string }) {
}
const match = matches[0];
router.replace({
pathname: "/agent/[...route]",
pathname: "/agent/[[...route]]",
params: { route: [match.serverId, match.agent.id] },
});
}, [isRedirecting, matches, router]);
const handleGoDraft = useCallback(() => {
router.replace("/agent");
router.replace({ pathname: "/agent/[[...route]]" });
}, [router]);
const handleSelectMatch = useCallback(
(match: AgentMatch) => {
router.replace({
pathname: "/agent/[...route]",
pathname: "/agent/[[...route]]",
params: { route: [match.serverId, match.agent.id] },
});
},