diff --git a/apps/client/src/ee/ai-chat/components/ai-chat-layout.tsx b/apps/client/src/ee/ai-chat/components/ai-chat-layout.tsx index f0fe3035..884e4f40 100644 --- a/apps/client/src/ee/ai-chat/components/ai-chat-layout.tsx +++ b/apps/client/src/ee/ai-chat/components/ai-chat-layout.tsx @@ -55,7 +55,7 @@ export default function AiChatLayout() { navigate(location.pathname, { replace: true, state: null }); }, [chatId, location, navigate, sendMessage]); - const hasMessages = messages.length > 0 || isStreaming; + const hasMessages = messages.length > 0 || isStreaming || !!chatId; // While the redirect effect is running (or if the user is still on this // component for any reason) never render the chat UI for a forbidden chat. @@ -65,18 +65,6 @@ export default function AiChatLayout() { return (
- {error && ( -
- {error} -
- )} - {hasMessages ? ( <> + {error && ( +
+ {error} +
+ )}