mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-25 20:04:09 +01:00
🗝️ fix: React Key Props and Minor UI Fixes from a11y Updates (#10954)
* refactor: Update Frontend logger function to enhance logging conditions
- Modified the logger function to check for logger enablement and development environment more robustly.
- Adjusted the condition to ensure logging occurs only when the logger is enabled or when the environment variable for logger is not set in development mode.
* fix: Add key prop to MeasuredRow components in Conversations for improved rendering
- Updated MeasuredRow components to include a key prop for better performance and to prevent rendering issues during list updates.
- Ensured consistent handling of item types within the Conversations component.
* refactor: Enhance ScrollToBottom component with forwardRef for improved functionality
- Updated ScrollToBottom component to use forwardRef, allowing it to accept a ref for better integration with parent components.
- Modified MessagesView to utilize the new ref for the ScrollToBottom button, improving scrolling behavior and performance.
* refactor: Enhance EndpointItem and renderEndpoints for improved model render keys
- Updated EndpointItem to accept an endpointIndex prop for better indexing of endpoints.
- Modified renderEndpoints to pass the endpointIndex to EndpointItem, improving the rendering of endpoint models.
- Adjusted renderEndpointModels to utilize the endpointIndex for unique key generation, enhancing performance and preventing rendering issues.
* refactor: Update BaseClient to handle non-ephemeral agents in conversation logic
- Added a check for non-ephemeral agents in BaseClient, modifying the exceptions set to include 'model' when applicable.
- Enhanced conversation handling to improve flexibility based on agent type.
* refactor: Optimize FavoritesList component for agent handling and loading states
- Updated FavoritesList to improve agent ID management by introducing combinedAgentsMap for better handling of missing agents.
- Refactored loading state logic to ensure accurate representation of agent loading status.
- Enhanced the use of useQueries for fetching missing agent data, streamlining the overall data retrieval process.
- Improved memoization of agent IDs and loading conditions for better performance and reliability.
* Revert "refactor: Update BaseClient to handle non-ephemeral agents in conversation logic"
This reverts commit 6738acbe04.
This commit is contained in:
parent
4d7e6b4a58
commit
06719794f6
7 changed files with 84 additions and 62 deletions
|
|
@ -1,12 +1,13 @@
|
|||
import React from 'react';
|
||||
import { forwardRef } from 'react';
|
||||
|
||||
type Props = {
|
||||
scrollHandler: React.MouseEventHandler<HTMLButtonElement>;
|
||||
};
|
||||
|
||||
export default function ScrollToBottom({ scrollHandler }: Props) {
|
||||
const ScrollToBottom = forwardRef<HTMLButtonElement, Props>(({ scrollHandler }, ref) => {
|
||||
return (
|
||||
<button
|
||||
ref={ref}
|
||||
onClick={scrollHandler}
|
||||
className="premium-scroll-button absolute bottom-5 right-1/2 cursor-pointer border border-border-light bg-surface-secondary"
|
||||
aria-label="Scroll to bottom"
|
||||
|
|
@ -22,4 +23,8 @@ export default function ScrollToBottom({ scrollHandler }: Props) {
|
|||
</svg>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
ScrollToBottom.displayName = 'ScrollToBottom';
|
||||
|
||||
export default ScrollToBottom;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue