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