👩‍💻 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:
Danny Avila 2024-04-26 10:27:49 -04:00 committed by GitHub
parent 4d0806d3e8
commit 2720327aa1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View file

@ -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);
}