From b105e9a04d912f448d395aa041f9bd5d7371e0f6 Mon Sep 17 00:00:00 2001 From: BrunoQuaresma Date: Tue, 3 Jun 2025 15:45:36 +0000 Subject: [PATCH] fix(chat): set default agent api url --- chat/src/components/chat-provider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chat/src/components/chat-provider.tsx b/chat/src/components/chat-provider.tsx index ba673f7..eba5e14 100644 --- a/chat/src/components/chat-provider.tsx +++ b/chat/src/components/chat-provider.tsx @@ -57,7 +57,7 @@ export function ChatProvider({ children }: PropsWithChildren) { const [serverStatus, setServerStatus] = useState("unknown"); const eventSourceRef = useRef(null); const searchParams = useSearchParams(); - const agentAPIUrl = searchParams.get("url"); + const agentAPIUrl = searchParams.get("url") || window.location.origin; // Set up SSE connection to the events endpoint useEffect(() => {