mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 18:00:15 +01:00
feat: icons for chat identification (#879)
* Added endpoint picture * plugin icon fix & new minimalist icon * changed from BingAIMinimalIcon to BingAIMinimalistIcon * fix(Conversation) reduced the space between the icon and the title * refactor(getIcon & getMinimalIcon) * moved IconProps in ~/common * refactor(getIcon & getMinimalistIcon) from switch/case to map * fix(getIcon.tsx) renamed to Icon * renamed all from Minimalist to Minimal
This commit is contained in:
parent
6358383001
commit
2419af8748
18 changed files with 356 additions and 126 deletions
|
|
@ -3,7 +3,7 @@ import { useRecoilState, useSetRecoilState } from 'recoil';
|
|||
import { useUpdateConversationMutation } from 'librechat-data-provider';
|
||||
import RenameButton from './RenameButton';
|
||||
import DeleteButton from './DeleteButton';
|
||||
import ConvoIcon from '../svg/ConvoIcon';
|
||||
import { MinimalIcon } from '~/components/Endpoints';
|
||||
import { useConversations, useConversation } from '~/hooks';
|
||||
import store from '~/store';
|
||||
|
||||
|
|
@ -66,6 +66,14 @@ export default function Conversation({ conversation, retainView }) {
|
|||
updateConvoMutation.mutate({ conversationId, title: titleInput });
|
||||
};
|
||||
|
||||
const icon = MinimalIcon({
|
||||
size: 20,
|
||||
endpoint: conversation.endpoint,
|
||||
model: conversation.model,
|
||||
error: false,
|
||||
className: 'mr-0',
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (updateConvoMutation.isSuccess) {
|
||||
refreshConversations();
|
||||
|
|
@ -97,7 +105,7 @@ export default function Conversation({ conversation, retainView }) {
|
|||
|
||||
return (
|
||||
<a data-testid="convo-item" onClick={() => clickHandler()} {...aProps}>
|
||||
<ConvoIcon />
|
||||
{icon}
|
||||
<div className="relative max-h-5 flex-1 overflow-hidden text-ellipsis break-all">
|
||||
{renaming === true ? (
|
||||
<input
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue