File tree Expand file tree Collapse file tree
docs/content.en/docs/release-notes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ Information about release notes of Coco Server is provided here.
4242- fix: switch server assistant and session unchanged #540
4343- fix: history list height #550
4444- fix: secondary page cannot be searched #551
45+ - fix: the scroll button is not displayed by default #552
4546
4647### ✈️ Improvements
4748
Original file line number Diff line number Diff line change @@ -52,10 +52,6 @@ export const ChatContent = ({
5252 return state . setCurrentSessionId ;
5353 } ) ;
5454
55- useEffect ( ( ) => {
56- setCurrentSessionId ( activeChat ?. _id ) ;
57- } , [ activeChat ?. _id ] ) ;
58-
5955 const { t } = useTranslation ( ) ;
6056
6157 const uploadFiles = useChatStore ( ( state ) => state . uploadFiles ) ;
@@ -65,10 +61,15 @@ export const ChatContent = ({
6561 const scrollRef = useRef < HTMLDivElement > ( null ) ;
6662 const [ isAtBottom , setIsAtBottom ] = useState ( true ) ;
6763
64+ useEffect ( ( ) => {
65+ setIsAtBottom ( true ) ;
66+ setCurrentSessionId ( activeChat ?. _id ) ;
67+ } , [ activeChat ?. _id ] ) ;
68+
6869 useEffect ( ( ) => {
6970 scrollToBottom ( ) ;
7071 } , [
71- activeChat ?. messages ,
72+ activeChat ?. id ,
7273 query_intent ?. message_chunk ,
7374 fetch_source ?. message_chunk ,
7475 pick_source ?. message_chunk ,
@@ -173,7 +174,7 @@ export const ChatContent = ({
173174
174175 { sessionId && < SessionFile sessionId = { sessionId } /> }
175176
176- < Splash assistantIDs = { assistantIDs } />
177+ < Splash assistantIDs = { assistantIDs } />
177178
178179 < ScrollToBottom scrollRef = { scrollRef } isAtBottom = { isAtBottom } />
179180 </ div >
You can’t perform that action at this time.
0 commit comments