mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
fix: loading and send button, mobile style
feat: sibling switch, mobile style fix: only the real submitting message will blink feat: drop the text version username, use a similar square. (or it will mass up the sibling switch)
This commit is contained in:
parent
a4d5f6a3f2
commit
953f846958
5 changed files with 26 additions and 9 deletions
|
|
@ -34,7 +34,7 @@ export default function TextChat({ messages }) {
|
|||
const messageHandler = (data, currentState, currentMsg) => {
|
||||
const { messages, _currentMsg, message, sender } = currentState;
|
||||
|
||||
dispatch(setMessages([...messages, currentMsg, { sender, text: data, parentMessageId: currentMsg?.messageId, messageId: currentMsg?.messageId + '_' }]));
|
||||
dispatch(setMessages([...messages, currentMsg, { sender, text: data, parentMessageId: currentMsg?.messageId, messageId: currentMsg?.messageId + '_', submitting: true }]));
|
||||
};
|
||||
|
||||
const createdHandler = (data, currentState, currentMsg) => {
|
||||
|
|
@ -158,7 +158,7 @@ export default function TextChat({ messages }) {
|
|||
const message = text.trim();
|
||||
const currentMsg = { sender: 'User', text: message, current: true, isCreatedByUser: true, parentMessageId: convo.parentMessageId || '00000000-0000-0000-0000-000000000000', messageId: fakeMessageId };
|
||||
const sender = model === 'chatgptCustom' ? chatGptLabel : model;
|
||||
const initialResponse = { sender, text: '', parentMessageId: fakeMessageId };
|
||||
const initialResponse = { sender, text: '', parentMessageId: fakeMessageId, submitting: true };
|
||||
|
||||
dispatch(setSubmitState(true));
|
||||
dispatch(setMessages([...messages, currentMsg, initialResponse]));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue