📋 fix: Ensure Textarea Resizes in Clipboard Edge Case (#2268)

* chore: ts-ignore fake conversation data used for testing

* chore(useTextarea): import helper functions to declutter hook

* fix(Textarea): reset textarea value explicitly by resetting `textAreaRef.current.value`
This commit is contained in:
Danny Avila 2024-04-01 13:40:21 -04:00 committed by GitHub
parent d07396d308
commit aff219c655
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 63 additions and 55 deletions

View file

@ -1,6 +1,20 @@
import { defaultEndpoints } from 'librechat-data-provider';
import type { EModelEndpoint, TEndpointsConfig, TConfig } from 'librechat-data-provider';
export const getAssistantName = ({
name,
localize,
}: {
name?: string;
localize: (phraseKey: string, ...values: string[]) => string;
}) => {
if (name && name.length > 0) {
return name;
} else {
return localize('com_ui_assistant');
}
};
export const getEndpointsFilter = (endpointsConfig: TEndpointsConfig) => {
const filter: Record<string, boolean> = {};
if (!endpointsConfig) {