👷 fix: Minor Fixes and Refactors (#2388)

* refactor(useTextarea): set Textarea disabled message due to key higher in priority

* fix(SidePanel): intended behavior for non-user provided keys

* fix: generate specs

* style: update combobox styling as before, with better dynamic height

* chore: remove unused import
This commit is contained in:
Danny Avila 2024-04-11 02:12:48 -04:00 committed by GitHub
parent 0fe47cf1f8
commit c19dfddd0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 136 additions and 75 deletions

View file

@ -1,19 +1,13 @@
import { EModelEndpoint } from 'librechat-data-provider';
import type { SwitcherProps } from '~/common';
import AssistantSwitcher from './AssistantSwitcher';
import { useChatContext } from '~/Providers';
import ModelSwitcher from './ModelSwitcher';
export default function Switcher(props: SwitcherProps) {
const { conversation } = useChatContext();
const { endpoint } = conversation ?? {};
if (!props.endpointKeyProvided) {
return null;
}
if (endpoint === EModelEndpoint.assistants) {
if (props.endpoint === EModelEndpoint.assistants && props.endpointKeyProvided) {
return <AssistantSwitcher {...props} />;
} else if (props.endpoint === EModelEndpoint.assistants) {
return null;
}
return <ModelSwitcher {...props} />;