fix: #2566 click avatar to edit context messages

This commit is contained in:
Yidadaa 2023-08-15 22:42:55 +08:00
parent ffddb7fb2b
commit 840277f584

View File

@ -1123,9 +1123,9 @@ function _Chat() {
10, 10,
); );
chatStore.updateCurrentSession((session) => { chatStore.updateCurrentSession((session) => {
const m = session.messages.find( const m = session.mask.context
(m) => m.id === message.id, .concat(session.messages)
); .find((m) => m.id === message.id);
if (m) { if (m) {
m.content = newMessage; m.content = newMessage;
} }