mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
fix: dont clear the input message if conversationId changed.
This commit is contained in:
parent
6abe34ee3b
commit
a641a0e373
1 changed files with 2 additions and 4 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
import React, { useEffect, useRef, useState } from 'react';
|
import React, { useEffect, useRef } from 'react';
|
||||||
import { useRecoilValue, useRecoilState } from 'recoil';
|
import { useRecoilValue, useRecoilState } from 'recoil';
|
||||||
import SubmitButton from './SubmitButton';
|
import SubmitButton from './SubmitButton';
|
||||||
import AdjustToneButton from './AdjustToneButton';
|
|
||||||
import OpenAIOptions from './OpenAIOptions';
|
import OpenAIOptions from './OpenAIOptions';
|
||||||
import ChatGPTOptions from './ChatGPTOptions';
|
import ChatGPTOptions from './ChatGPTOptions';
|
||||||
import BingAIOptions from './BingAIOptions';
|
import BingAIOptions from './BingAIOptions';
|
||||||
|
|
@ -19,7 +18,6 @@ export default function TextChat({ isSearchView = false }) {
|
||||||
|
|
||||||
const conversation = useRecoilValue(store.conversation);
|
const conversation = useRecoilValue(store.conversation);
|
||||||
const latestMessage = useRecoilValue(store.latestMessage);
|
const latestMessage = useRecoilValue(store.latestMessage);
|
||||||
const messages = useRecoilValue(store.messages);
|
|
||||||
const [text, setText] = useRecoilState(store.text);
|
const [text, setText] = useRecoilState(store.text);
|
||||||
// const [text, setText] = useState('');
|
// const [text, setText] = useState('');
|
||||||
|
|
||||||
|
|
@ -38,7 +36,7 @@ export default function TextChat({ isSearchView = false }) {
|
||||||
// auto focus to input, when enter a conversation.
|
// auto focus to input, when enter a conversation.
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (conversation?.conversationId !== 'search') inputRef.current?.focus();
|
if (conversation?.conversationId !== 'search') inputRef.current?.focus();
|
||||||
setText('');
|
// setText('');
|
||||||
}, [conversation?.conversationId]);
|
}, [conversation?.conversationId]);
|
||||||
|
|
||||||
// // controls the height of Bing tone style tabs
|
// // controls the height of Bing tone style tabs
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue