Skip to content

Commit

Permalink
fix: don't error when agent isn't found for thread inspect
Browse files Browse the repository at this point in the history
This is a fix for issue #76. There will be a follow up
that overhauls how errors are handled and displayed
but this is a quick fix for the original issue.

Signed-off-by: tylerslaton <[email protected]>
  • Loading branch information
tylerslaton committed Oct 18, 2024
1 parent c10b14e commit 0d8126c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/admin/app/routes/_auth.thread.$id.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { $params } from "remix-routes";
import { Agent } from "~/lib/model/agents";
import { AgentService } from "~/lib/service/api/agentService";
import { ThreadsService } from "~/lib/service/api/threadsService";
import { noop } from "~/lib/utils";

import { Chat } from "~/components/chat";
import { ChatProvider } from "~/components/chat/ChatContext";
Expand Down Expand Up @@ -39,7 +40,7 @@ export const clientLoader = async ({ params }: ClientLoaderFunctionArgs) => {
if (!thread) throw redirect("/threads");

const agent = thread.agentID
? await AgentService.getAgentById(thread.agentID)
? await AgentService.getAgentById(thread.agentID).catch(noop)
: null;
const files = await ThreadsService.getFiles(id);
const knowledge = await ThreadsService.getKnowledge(id);
Expand Down

0 comments on commit 0d8126c

Please sign in to comment.