mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 02:10:15 +01:00
👩💻 fix: Minor UI fixes (#2548)
* fix(useMessageHelpers): define iconEndpoint * fix: rely on Assistant Switcher effect for defining `assistant_id`, ensure ChatRoute `newConversation` only fires once
This commit is contained in:
parent
4d0806d3e8
commit
2720327aa1
3 changed files with 6 additions and 3 deletions
|
|
@ -62,11 +62,12 @@ export default function useMessageHelpers(props: TMessageProps) {
|
|||
const assistant =
|
||||
conversation?.endpoint === EModelEndpoint.assistants && assistantMap?.[message?.model ?? ''];
|
||||
|
||||
const iconEndpoint = message?.endpoint ?? conversation?.endpoint;
|
||||
const icon = Icon({
|
||||
...conversation,
|
||||
...(message as TMessage),
|
||||
iconURL: !assistant
|
||||
? getEndpointField(endpointsConfig, conversation?.endpoint, 'iconURL')
|
||||
? getEndpointField(endpointsConfig, iconEndpoint, 'iconURL')
|
||||
: (assistant?.metadata?.avatar as string | undefined) ?? '',
|
||||
model: message?.model ?? conversation?.model,
|
||||
assistantName: assistant ? (assistant.name as string | undefined) : '',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue