fix: didnt use preset from a exist convo
This commit is contained in:
@@ -49,7 +49,8 @@ export default function NewConversationMenu() {
|
||||
// update the default model when availableModels changes
|
||||
// typically, availableModels changes => modelsFilter or customGPTModels changes
|
||||
useEffect(() => {
|
||||
if (conversationId == 'new') {
|
||||
const isInvalidConversation = !availableEndpoints.find(e => e === endpoint);
|
||||
if (conversationId == 'new' && isInvalidConversation) {
|
||||
newConversation();
|
||||
}
|
||||
}, [availableEndpoints]);
|
||||
|
||||
@@ -5,7 +5,7 @@ import OpenAIOptions from './OpenAIOptions';
|
||||
import ChatGPTOptions from './ChatGPTOptions';
|
||||
import BingAIOptions from './BingAIOptions';
|
||||
// import BingStyles from './BingStyles';
|
||||
import EndpointMenu from './Endpoints/NewConversationMenu';
|
||||
import NewConversationMenu from './Endpoints/NewConversationMenu';
|
||||
import Footer from './Footer';
|
||||
import TextareaAutosize from 'react-textarea-autosize';
|
||||
import { useMessageHandler } from '../../utils/handleSubmit';
|
||||
@@ -145,7 +145,7 @@ export default function TextChat({ isSearchView = false }) {
|
||||
disabled ? 'dark:bg-gray-900' : 'dark:bg-gray-700'
|
||||
} dark:text-white dark:shadow-[0_0_15px_rgba(0,0,0,0.10)] md:py-3 md:pl-4`}
|
||||
>
|
||||
<EndpointMenu />
|
||||
<NewConversationMenu />
|
||||
<TextareaAutosize
|
||||
tabIndex="0"
|
||||
autoFocus
|
||||
|
||||
Reference in New Issue
Block a user