mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-21 02:40:14 +01:00
fix(chatGPTBrowser): render markdown formatting by setting isCreatedByUser, fix(useMessageHandler): avoid double appearance of cursor by setting latest message at initial response creation time
This commit is contained in:
parent
9ef1686e18
commit
ae5c06f381
2 changed files with 12 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ import type { TAskFunction } from '~/common';
|
|||
import store from '~/store';
|
||||
|
||||
const useMessageHandler = () => {
|
||||
const latestMessage = useRecoilValue(store.latestMessage);
|
||||
const [latestMessage, setLatestMessage] = useRecoilState(store.latestMessage);
|
||||
const setSiblingIdx = useSetRecoilState(
|
||||
store.messagesSiblingIdxFamily(latestMessage?.parentMessageId),
|
||||
);
|
||||
|
|
@ -134,6 +134,7 @@ const useMessageHandler = () => {
|
|||
} else {
|
||||
setMessages([...submission.messages, currentMsg, initialResponse]);
|
||||
}
|
||||
setLatestMessage(initialResponse);
|
||||
setSubmission(submission);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue