diff --git a/frontend/chat-ui/src/components/ChatWindow.jsx b/frontend/chat-ui/src/components/ChatWindow.jsx index 0dfaccb..ffafc74 100644 --- a/frontend/chat-ui/src/components/ChatWindow.jsx +++ b/frontend/chat-ui/src/components/ChatWindow.jsx @@ -15,7 +15,8 @@ export default function ChatWindow() { useEffect(() => { if (!state.currentConversation) return; const base = API_BASE_URL || window.location.origin; - const url = new URL(`/stream/${state.currentConversation.id}`, base); + const baseUrl = base.endsWith('/') ? base : `${base}/`; + const url = new URL(`stream/${state.currentConversation.id}`, baseUrl); const apiKey = import.meta.env.VITE_API_KEY; if (apiKey) { url.searchParams.set('api_key', apiKey);