️ refactor: Optimize Rendering Performance for Icons, Conversations (#5234)

* refactor: HoverButtons and Fork components to use explicit props

* refactor: improve typing for Fork Component

* fix: memoize SpecIcon to avoid unnecessary re-renders

* feat: introduce URLIcon component and update SpecIcon for improved icon handling

* WIP: optimizing icons

* refactor: simplify modelLabel assignment in Message components

* refactor: memoize ConvoOptions component to optimize rendering performance
This commit is contained in:
Danny Avila 2025-01-09 15:40:10 -05:00 committed by GitHub
parent 687ab32bd3
commit 0f95604a67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 206 additions and 171 deletions

View file

@ -204,9 +204,9 @@ export function getIconEndpoint({
iconURL,
endpoint,
}: {
endpointsConfig: t.TEndpointsConfig | undefined;
iconURL: string | undefined;
endpoint: string | null | undefined;
endpointsConfig?: t.TEndpointsConfig;
iconURL?: string | null;
endpoint?: string | null;
}) {
return (endpointsConfig?.[iconURL ?? ''] ? iconURL ?? endpoint : endpoint) ?? '';
}
@ -219,7 +219,7 @@ export function getIconKey({
endpointIconURL: iconURL,
}: {
endpoint?: string | null;
endpointsConfig?: t.TEndpointsConfig | undefined;
endpointsConfig?: t.TEndpointsConfig;
endpointType?: string | null;
endpointIconURL?: string;
}) {