fix closed conversation messages

This commit is contained in:
2026-04-18 20:36:46 -06:00
parent ba1ccf9d95
commit 51903f2d37
2 changed files with 6 additions and 0 deletions

View File

@@ -440,6 +440,8 @@ function AiChatPage() {
setMessages([]);
setError(null);
setBotTyping(false);
await Promise.all([fetchConversation(convId), fetchMessages(convId)]);
connectStomp(convId);
router.replace(`/ai-chat?id=${convId}`, { scroll: false });
}

View File

@@ -422,6 +422,10 @@ function ChatPage() {
if (stompRef.current) { stompRef.current.deactivate(); stompRef.current = null; }
setMessages([]);
setError(null);
setSwitchingConv(true);
await Promise.all([fetchConversation(convId), fetchMessages(convId)]);
setSwitchingConv(false);
connectStomp(convId);
router.replace(`/chat?id=${convId}`, { scroll: false });
}