mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
🐞 fix(client): Prevent Async Reset of Latest Message (#2203)
* refactor: use debug statement runStepCompleted message * fix(ChatRoute): prevent use of `newConversation` from reseting `latestMessage`, which would fire asynchronously and finalize after `latestMessage` was already correctly set
This commit is contained in:
parent
8fc52348e8
commit
3ef46132eb
2 changed files with 3 additions and 1 deletions
|
|
@ -571,7 +571,7 @@ class StreamRunManager {
|
|||
const isMessage = step.type === StepTypes.MESSAGE_CREATION;
|
||||
|
||||
if (isMessage) {
|
||||
logger.warn('RunStep Message completion: to be handled by Message Event.', step);
|
||||
logger.debug('RunStep Message completion: to be handled by Message Event.', step);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ export default function ChatRoute() {
|
|||
/* this is necessary to load all existing settings */
|
||||
preset: initialConvoQuery.data as TPreset,
|
||||
modelsData: modelsQuery.data,
|
||||
keepLatestMessage: true,
|
||||
});
|
||||
hasSetConversation.current = !!assistants;
|
||||
} else if (!hasSetConversation.current && conversationId === 'new' && assistants) {
|
||||
|
|
@ -75,6 +76,7 @@ export default function ChatRoute() {
|
|||
template: initialConvoQuery.data,
|
||||
preset: initialConvoQuery.data as TPreset,
|
||||
modelsData: modelsQuery.data,
|
||||
keepLatestMessage: true,
|
||||
});
|
||||
hasSetConversation.current = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue