diff --git a/ui/components/ChatWindow.tsx b/ui/components/ChatWindow.tsx index 74df3b2..01c10aa 100644 --- a/ui/components/ChatWindow.tsx +++ b/ui/components/ChatWindow.tsx @@ -26,7 +26,7 @@ const fetchSettings = async () => { try { const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/settings`); const settings = await res.json(); - + if (settings) { localStorage.setItem('chatModelProvider', settings.chatModelProvider); localStorage.setItem('chatModel', settings.chatModel); @@ -215,7 +215,8 @@ const useSocket = ( ws.onclose = () => { clearTimeout(timeoutId); - setError(true); + //setError(true); + setWs(null); console.log('[DEBUG] closed'); };