Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👐 refactor: Agents Accessibility and Gemini Error Handling #5972

Merged
merged 14 commits into from
Feb 21, 2025

Conversation

danny-avila
Copy link
Owner

@danny-avila danny-avila commented Feb 21, 2025

Summary

Closes #5954

I implemented a series of enhancements across both the server and client components to improve error handling, accessibility, and layout consistency in LibreChat. I improved the GoogleClient’s abort handling and error filtering, replaced outdated dropdowns with the more accessible ControlCombobox, refined focus management in agent selection, and updated UI styling in agent and model panels. I also introduced a new translation key for clearer user copy.

  • Updated type annotations and added abort event handling in GoogleClient to catch aborted requests and log warnings for GoogleGenerativeAI errors.

  • Improved global error handling in the API server to ignore uncatchable abort errors and log advisory messages for upstream issues.

  • Added a selectId prop to AgentSelect and ControlCombobox to maintain focus after agent selection.

  • Replaced SelectDropDown components with ControlCombobox in AgentSelect and ModelPanel for better accessibility and consistency.

  • Adjusted layout and styling in AgentPanel, AgentPanelSkeleton, and ModelPanel to improve spacing, alignment, and responsiveness.

  • Added iconClassName, containerClassName, and iconSide props for enhanced customization in ControlCombobox, AgentSwitcher, and AssistantSwitcher.

  • Introduced a new translation key to support improved UI clarity.

  • Bug fix (non-breaking change which fixes an issue)

  • New feature (non-breaking change which adds functionality)

Testing:

  • Manually simulated aborted content generation requests in GoogleClient to verify that abort events are caught and logged.
  • Verified in the UI that the new selectId prop keeps focus on the agent selection component after updates.
  • Confirmed that layout changes and styling adjustments render correctly across agent panels, skeleton components, and model panels.
  • Ensured that the new translation key integrates seamlessly into the UI copy.

Checklist:

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes
  • Any changes dependent on mine have been merged and published in downstream modules

…nts and adjust structure for better alignment
…focus going to start to page after agent selection
…tent generation requests, catch "uncaught" abort errors and GoogleGenerativeAI errors from `@google/generative-ai`
@danny-avila danny-avila changed the title 👐 refactor: Enhance Accessibility, Styling, And Gemini Error Handling 👐 refactor: Agents Accessibility and Gemini Error Handling Feb 21, 2025
@danny-avila danny-avila merged commit fc733d2 into main Feb 21, 2025
7 checks passed
@danny-avila danny-avila deleted the fix/agents-a11y branch February 21, 2025 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: [GoogleGenerativeAI Error]: Failed to parse stream
1 participant