fix six app bugs
This commit is contained in:
@@ -45,9 +45,9 @@ function AiChatPage() {
|
||||
lastScrolledIdRef.current = lastMsg.id;
|
||||
const area = messagesAreaRef.current;
|
||||
if (!area) return;
|
||||
const nearBottom = area.scrollHeight - area.scrollTop - area.clientHeight < 150;
|
||||
const nearBottom = area.scrollHeight - area.scrollTop - area.clientHeight < 80;
|
||||
if (nearBottom) {
|
||||
messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
|
||||
area.scrollTop = area.scrollHeight;
|
||||
}
|
||||
}, [messages]);
|
||||
|
||||
@@ -347,11 +347,6 @@ function AiChatPage() {
|
||||
if (pollRef.current) clearInterval(pollRef.current);
|
||||
setMessages([]);
|
||||
setError(null);
|
||||
setLoadingConv(true);
|
||||
await fetchConversation(convId);
|
||||
await fetchMessages(convId);
|
||||
setLoadingConv(false);
|
||||
startPolling(convId);
|
||||
router.replace(`/ai-chat?id=${convId}`, { scroll: false });
|
||||
}
|
||||
|
||||
|
||||
@@ -352,11 +352,6 @@ function ChatPage() {
|
||||
if (pollRef.current) clearInterval(pollRef.current);
|
||||
setMessages([]);
|
||||
setError(null);
|
||||
setLoadingConv(true);
|
||||
await fetchConversation(convId);
|
||||
await fetchMessages(convId);
|
||||
setLoadingConv(false);
|
||||
startPolling(convId);
|
||||
router.replace(`/chat?id=${convId}`, { scroll: false });
|
||||
}
|
||||
|
||||
|
||||
@@ -58,6 +58,8 @@ body {
|
||||
align-items: center;
|
||||
gap: 1.25rem;
|
||||
justify-content: center;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Indivdual Link Styles */
|
||||
|
||||
Reference in New Issue
Block a user