fix:chat web bug (#1932)

Co-authored-by: lhwan <1017484907@qq.com>
This commit is contained in:
明天
2024-09-02 10:06:32 +08:00
committed by GitHub
parent 759f7d99cc
commit 76efa841f8
184 changed files with 359 additions and 346 deletions

View File

@@ -72,15 +72,15 @@ const ChatCompletion: React.FC = () => {
setTimeout(() => {
scrollableRef.current?.scrollTo(0, scrollableRef.current?.scrollHeight);
}, 50);
}, [history]);
}, [history, history[history.length - 1].context]);
return (
<div className='flex flex-col w-5/6 mx-auto' ref={scrollableRef}>
{!!showMessages.length &&
showMessages.map(content => {
showMessages.map((content, index) => {
return (
<ChatContent
key={content.key}
key={index}
content={content}
onLinkClick={() => {
setJsonModalOpen(true);