From e8f1fc312f16b37156dd0a1c21ff242388f24ac0 Mon Sep 17 00:00:00 2001 From: Ivy Date: Mon, 30 Dec 2024 10:12:04 -0500 Subject: [PATCH] fix: agent id briefly showing on breadcrumb in threads --- ui/admin/app/routes/_auth.agents._index.tsx | 2 +- ui/admin/app/routes/_auth.threads.$id.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/admin/app/routes/_auth.agents._index.tsx b/ui/admin/app/routes/_auth.agents._index.tsx index cf3f7049d..d75319a29 100644 --- a/ui/admin/app/routes/_auth.agents._index.tsx +++ b/ui/admin/app/routes/_auth.agents._index.tsx @@ -24,7 +24,6 @@ import { } from "~/components/ui/tooltip"; export async function clientLoader() { - mutate(AgentService.getAgents.key(), ThreadsService.getThreads.key()); await Promise.all([ preload(AgentService.getAgents.key(), AgentService.getAgents), preload(ThreadsService.getThreads.key(), ThreadsService.getThreads), @@ -72,6 +71,7 @@ export default function Agents() { name: generateRandomName(), } as Agent, }).then((agent) => { + mutate(AgentService.getAgents.key()); navigate( $path("/agents/:agent", { agent: agent.id, diff --git a/ui/admin/app/routes/_auth.threads.$id.tsx b/ui/admin/app/routes/_auth.threads.$id.tsx index 52b9ab48e..7ebac7be2 100644 --- a/ui/admin/app/routes/_auth.threads.$id.tsx +++ b/ui/admin/app/routes/_auth.threads.$id.tsx @@ -74,7 +74,7 @@ export default function ChatAgent() { throw new Error("Trying to view a thread with an unsupported parent."); }; - const [isAgent, entity] = [agent !== null, getEntity()]; + const entity = getEntity(); return (