Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

👩‍💻 fix: Minor UI fixes (#2548)

Danny Avila2720327aa1f8
diff --git a/client/src/components/SidePanel/AssistantSwitcher.tsx b/client/src/components/SidePanel/AssistantSwitcher.tsx
index f36d14a2e2..60bdd15bfb 100644
--- a/client/src/components/SidePanel/AssistantSwitcher.tsx
+++ b/client/src/components/SidePanel/AssistantSwitcher.tsx
@@ -27,6 +27,7 @@ export default function AssistantSwitcher({ isCollapsed }: SwitcherProps) {
const assistant_id =
localStorage.getItem(`assistant_id__${index}`) ?? assistants[0]?.id ?? '';
const assistant = assistantMap?.[assistant_id];
+
if (!assistant) {
return;
}
@@ -34,6 +35,7 @@ export default function AssistantSwitcher({ isCollapsed }: SwitcherProps) {
if (endpoint !== EModelEndpoint.assistants) {
return;
}
+
setOption('model')(assistant.model);
setOption('assistant_id')(assistant_id);
}
diff --git a/client/src/hooks/Messages/useMessageHelpers.ts b/client/src/hooks/Messages/useMessageHelpers.ts
index 45378b3c5b..5d22d183d2 100644
--- a/client/src/hooks/Messages/useMessageHelpers.ts
+++ b/client/src/hooks/Messages/useMessageHelpers.ts
@@ -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) : '',
diff --git a/client/src/routes/ChatRoute.tsx b/client/src/routes/ChatRoute.tsx
index 9016d86121..622c91bc67 100644
--- a/client/src/routes/ChatRoute.tsx
+++ b/client/src/routes/ChatRoute.tsx
@@ -58,7 +58,7 @@ export default function ChatRoute() {
modelsData: modelsQuery.data,
template: conversation ? conversation : undefined,
});
- hasSetConversation.current = !!assistants;
+ hasSetConversation.current = true;
} else if (
initialConvoQuery.data &&
endpointsQuery.data &&
@@ -73,7 +73,7 @@ export default function ChatRoute() {
modelsData: modelsQuery.data,
keepLatestMessage: true,
});
- hasSetConversation.current = !!assistants;
+ hasSetConversation.current = true;
} else if (
!hasSetConversation.current &&
!modelsQuery.data?.initial &&