mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-23 04:12:13 +00:00
fix: resolve merge conflicts with upstream main
This commit is contained in:
parent
235c336381
commit
ef7b17f9ab
@ -86,7 +86,7 @@ const ChatContentContainer = ({}, ref: React.ForwardedRef<any>) => {
|
||||
useEffect(() => {
|
||||
console.log('ChatContentContainer updating prevMessageCountRef:', {
|
||||
currentLength: history.length,
|
||||
prevCount: prevMessageCountRef.current
|
||||
prevCount: prevMessageCountRef.current,
|
||||
});
|
||||
|
||||
// Only update if this is the first time (count is 0)
|
||||
@ -128,7 +128,7 @@ const ChatContentContainer = ({}, ref: React.ForwardedRef<any>) => {
|
||||
historyLength: history.length,
|
||||
userRecentlyScrolled,
|
||||
isUserScrolling: isUserScrollingRef.current,
|
||||
isAutoScrolling: isAutoScrollingRef.current
|
||||
isAutoScrolling: isAutoScrollingRef.current,
|
||||
});
|
||||
|
||||
// Always handle new messages first - this is the highest priority
|
||||
@ -172,7 +172,7 @@ const ChatContentContainer = ({}, ref: React.ForwardedRef<any>) => {
|
||||
currentHeight,
|
||||
lastHeight: lastContentHeightRef.current,
|
||||
heightDiff,
|
||||
threshold: 12
|
||||
threshold: 12,
|
||||
});
|
||||
|
||||
// Only scroll if content height increased by at least ~0.5 lines (12px) for smoother experience
|
||||
@ -201,7 +201,7 @@ const ChatContentContainer = ({}, ref: React.ForwardedRef<any>) => {
|
||||
console.log('ChatContentContainer streaming blocked:', {
|
||||
userRecentlyScrolled,
|
||||
isUserScrolling: isUserScrollingRef.current,
|
||||
isAutoScrolling: isAutoScrollingRef.current
|
||||
isAutoScrolling: isAutoScrollingRef.current,
|
||||
});
|
||||
}
|
||||
}, [history]);
|
||||
@ -276,11 +276,7 @@ const ChatContentContainer = ({}, ref: React.ForwardedRef<any>) => {
|
||||
|
||||
return (
|
||||
<div className='flex flex-1 relative'>
|
||||
<div
|
||||
ref={scrollRef}
|
||||
className='h-full w-full mx-auto overflow-y-auto'
|
||||
style={{ scrollBehavior: 'smooth' }}
|
||||
>
|
||||
<div ref={scrollRef} className='h-full w-full mx-auto overflow-y-auto' style={{ scrollBehavior: 'smooth' }}>
|
||||
<ChatHeader isScrollToTop={isScrollToTop} />
|
||||
<ChatCompletion />
|
||||
</div>
|
||||
|
@ -100,7 +100,7 @@ const ChatCompletion: React.FC = () => {
|
||||
useEffect(() => {
|
||||
console.log('ChatCompletion updating prevMessageCountRef:', {
|
||||
currentLength: history.length,
|
||||
prevCount: prevMessageCountRef.current
|
||||
prevCount: prevMessageCountRef.current,
|
||||
});
|
||||
|
||||
// Only update if this is the first time (count is 0)
|
||||
@ -142,7 +142,7 @@ const ChatCompletion: React.FC = () => {
|
||||
historyLength: history.length,
|
||||
userRecentlyScrolled,
|
||||
isUserScrolling: isUserScrollingRef.current,
|
||||
isAutoScrolling: isAutoScrollingRef.current
|
||||
isAutoScrolling: isAutoScrollingRef.current,
|
||||
});
|
||||
|
||||
// Always handle new messages first - this is the highest priority
|
||||
@ -186,7 +186,7 @@ const ChatCompletion: React.FC = () => {
|
||||
currentHeight,
|
||||
lastHeight: lastContentHeightRef.current,
|
||||
heightDiff,
|
||||
threshold: 12
|
||||
threshold: 12,
|
||||
});
|
||||
|
||||
// Only scroll if content height increased by at least ~0.5 lines (12px) for smoother experience
|
||||
@ -215,7 +215,7 @@ const ChatCompletion: React.FC = () => {
|
||||
console.log('ChatCompletion streaming blocked:', {
|
||||
userRecentlyScrolled,
|
||||
isUserScrolling: isUserScrollingRef.current,
|
||||
isAutoScrolling: isAutoScrollingRef.current
|
||||
isAutoScrolling: isAutoScrollingRef.current,
|
||||
});
|
||||
}
|
||||
}, [history]);
|
||||
|
Loading…
Reference in New Issue
Block a user