diff --git a/components/Chat/Chat.tsx b/components/Chat/Chat.tsx index 1cf1695..d4548c7 100644 --- a/components/Chat/Chat.tsx +++ b/components/Chat/Chat.tsx @@ -20,6 +20,7 @@ import { ChatMessage } from './ChatMessage'; import { ErrorMessageDiv } from './ErrorMessageDiv'; import { ModelSelect } from './ModelSelect'; import { SystemPrompt } from './SystemPrompt'; +import { IconSettings } from "@tabler/icons-react"; interface Props { conversation: Conversation; @@ -56,6 +57,7 @@ export const Chat: FC = ({ const { t } = useTranslation('chat'); const [currentMessage, setCurrentMessage] = useState(); const [autoScrollEnabled, setAutoScrollEnabled] = useState(true); + const [showSettings, setShowSettings] = useState(false); const messagesEndRef = useRef(null); const chatContainerRef = useRef(null); @@ -82,6 +84,10 @@ export const Chat: FC = ({ } }; + const handleSettings = () => { + setShowSettings(!showSettings); + }; + useEffect(() => { scrollToBottom(); setCurrentMessage(conversation.messages[conversation.messages.length - 2]); @@ -152,9 +158,21 @@ export const Chat: FC = ({ ) : ( <> -
- {t('Model')}: {conversation.model.name} +
+ {t('Model')}: {conversation.model.name} + +
+ {showSettings && ( +
+
+ onUpdateConversation(conversation, { key: "model", value: model })} + /> +
+ )} {conversation.messages.map((message, index) => (