mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
feat: show model at the top of conversation messages.
This commit is contained in:
parent
c27554ed2e
commit
e3b0cb7db7
1 changed files with 7 additions and 0 deletions
|
|
@ -8,10 +8,14 @@ import { useSelector } from 'react-redux';
|
|||
const Messages = ({ messages, messageTree }) => {
|
||||
const [currentEditId, setCurrentEditId] = useState(-1);
|
||||
const { conversationId } = useSelector((state) => state.convo);
|
||||
const { model, customModel, chatGptLabel } = useSelector((state) => state.submit);
|
||||
const { models } = useSelector((state) => state.models);
|
||||
const [showScrollButton, setShowScrollButton] = useState(false);
|
||||
const scrollableRef = useRef(null);
|
||||
const messagesEndRef = useRef(null);
|
||||
|
||||
const modelName = models.find(element => element.model==model)?.name
|
||||
|
||||
useEffect(() => {
|
||||
const timeoutId = setTimeout(() => {
|
||||
const scrollable = scrollableRef.current;
|
||||
|
|
@ -60,6 +64,9 @@ const Messages = ({ messages, messageTree }) => {
|
|||
>
|
||||
{/* <div className="flex-1 overflow-hidden"> */}
|
||||
<div className="dark:gpt-dark-gray h-full">
|
||||
<div className="flex w-full items-center justify-center gap-1 border-b border-black/10 bg-gray-50 p-3 text-gray-500 dark:border-gray-900/50 dark:bg-gray-700 dark:text-gray-300 text-sm">
|
||||
Model: {modelName} {customModel?`(${customModel})`:null}
|
||||
</div>
|
||||
<div className="dark:gpt-dark-gray flex h-full flex-col items-center text-sm">
|
||||
{messageTree.length === 0 ? (
|
||||
<Spinner />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue